This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.
Proposal: API change #1
Open
Description
I am proposing two changes:
-
Make this module a collection of utilities, i.e. move the current implementation out of
/index.js
intolib/
folder, change the way how the module is used:var lt = require('loopback-testing').TestCaseHelper; lt.describe(/* ... */) // this way I can add my new code as var TestDataBuilder = require('loopback-testing').TestDataBuilder;
-
Add a function that will merge install describe/it/etc. as globals, possibly extending symbols already defined by Mocha.
require('loopback-testing').mocha('bdd'); // now I can write // describe.whenCalledRemotely // given.model('Product', /*.. */)
Later we can implement support for other interfaces than bdd and possibly other test frameworks like TAP.
@ritch what's you opinion? What was the reason why you decided to not amend mocha's global symbols, as we discussed in the other pull request?
Perhaps the second point should be implemented by a standalone module depending on loopback-testing, e.g. loopback-mocha?
Metadata
Metadata
Assignees
Labels
No labels