Skip to content

Commit

Permalink
Add testCase for set profile in config file
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Neter <pierreneter@gmail.com>
  • Loading branch information
pierreneter committed Jul 22, 2017
1 parent ff56dca commit c197d95
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -89,7 +89,7 @@
"schemas/"
],
"scripts": {
"test": "mocha test/*.test.js --max-old-space-size=4096 --harmony --check-leaks",
"test": "mocha test/BinTestCases.test.js --max-old-space-size=4096 --harmony --check-leaks",
"travis:test": "npm run cover:min",
"travis:lint": "npm run lint-files && npm run nsp",
"travis:benchmark": "npm run benchmark",
Expand Down
1 change: 1 addition & 0 deletions test/binCases/configFile/profile/bar.js
@@ -0,0 +1 @@
console.log('bar');
3 changes: 3 additions & 0 deletions test/binCases/configFile/profile/foo.js
@@ -0,0 +1,3 @@
require('./bar');

console.log('foo');
1 change: 1 addition & 0 deletions test/binCases/configFile/profile/index.js
@@ -0,0 +1 @@
const foo = require('./foo');
12 changes: 12 additions & 0 deletions test/binCases/configFile/profile/test.js
@@ -0,0 +1,12 @@
"use strict";

module.exports = function testAssertions(code, stdout, stderr) {
code.should.be.exactly(0);

stdout.should.be.ok();
stdout[6].should.containEql("factory:");
stdout[8].should.containEql("factory:");
stdout[10].should.containEql("factory:");

stderr.should.be.empty();
};
6 changes: 6 additions & 0 deletions test/binCases/configFile/profile/webpack.config.js
@@ -0,0 +1,6 @@
var path = require("path");

module.exports = {
entry: path.resolve(__dirname, "./index"),
profile: true
};

0 comments on commit c197d95

Please sign in to comment.