GithubHelp home page GithubHelp logo

Comments (3)

dwbruhn avatar dwbruhn commented on August 20, 2024

So far I've tracked it down to this function:

nemo/lib/runner/mocha.js

Lines 46 to 48 in aaec89b

.then((nemoCoreConfig) => {
NemoBaseConfig.merge(nemoCoreConfig);
return NemoCore(NemoBaseConfig);

When running with a JSON config, the nemoCoreConfig has nemo-view in the plugins section:

nemoCoreConfig plugins:  { view:
   { module: 'nemo-view',

But when running with plain JS, the plugins section of nemoCoreConfig is undefined:

nemoCoreConfig plugins:  undefined

(In both cases, snap is in the NemoBaseConfig which gets merged with the nemoCoreConfig.)

from nemo.

dwbruhn avatar dwbruhn commented on August 20, 2024

So here's the problem:

nemo/lib/runner/mocha.js

Lines 40 to 44 in aaec89b

// plain JS config use case
return NemoCore.Configure({
driver: driverConf,
data: dataConf
});

If there's no instanceConfig.basedir (which is the case when you're using an explicit/implicit config file), this generates a nemoCoreConfig with no plugin information.

One possible (and kinda ugly) fix is to pass program.configFile all the way down here so if instanceConfig.basedir is undefined, it will read the config from the config file instead. This like what's being done in _nemo:

nemo/bin/_nemo

Lines 87 to 99 in aaec89b

if (program.baseDirectory) {
// baseDirectory case
return NemoFactory.configure(program);
}
else if (program.configFile) {
// explicit config file case
return NemoFactory.configureJS(program);
}
try {
// implicit config file case
require(path.resolve(process.cwd(), 'nemo.config'));
program.configFile = path.resolve(process.cwd(), 'nemo.config');
return NemoFactory.configureJS(program);

from nemo.

dwbruhn avatar dwbruhn commented on August 20, 2024

BTW while debugging this I noticed that the -C option is kind difficult with JSON files now. It doesn't support comments in JSON, and if you use shortstop handlers you have to back up out of the node_modules/nemo-core/etc. directory like this:

"data": "require:../../../../test/functional/data/data.json"

from nemo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.