senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.95k stars 314 forks source link

explicit tests for these operators #813

Closed github-actions[bot] closed 4 years ago

github-actions[bot] commented 4 years ago

explicit tests for these operators

https://github.com/senecajs/seneca/blob/fdd21a4e7e3cd07c7d90238e74e5d05329abd979/lib/use.js#L87

    return {
        // TODO: explicit tests for these operators
        op: {
            seneca_plugin: (tr, ctx, data) => {
                nua_1.default(data, tr.out.merge, { preserve: true });
                ctx.seneca.private$.plugins[data.plugin.fullname] = tr.out.plugin;
                return { stop: false };
            },
            seneca_export: (tr, ctx, data) => {
                Object.assign(data.exports, tr.out.exports);
                Object.assign(ctx.seneca.private$.exports, tr.out.exports);
                return { stop: false };
            },
            seneca_options: (tr, ctx, data) => {
                nua_1.default(data.plugin.options, tr.out.plugin.options, { preserve: true });
                let plugin_fullname = data.plugin.fullname;
                let plugin_options = data.plugin.options;
                let plugin_options_update = { plugin: {} };
                plugin_options_update.plugin[plugin_fullname] = plugin_options;
                ctx.seneca.options(plugin_options_update);
                return { stop: false };
            },
        },
        args: (spec) => {
            let args = [...spec.ctx.args];
github-actions[bot] commented 4 years ago

Closed in 6d7a79515c7272184785478495f3958ed872c827

github-actions[bot] commented 4 years ago

Closed in 6d7a79515c7272184785478495f3958ed872c827