Use `chai` instead of `must`
As of 1.10, chai supports nonary assertions, there are no more reasons for using a different variant.
This commit is contained in:
parent
6040f66adc
commit
e2aff71bf9
|
@ -32,15 +32,14 @@
|
||||||
"underscore": "^1.6.0"
|
"underscore": "^1.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^6.1.0",
|
|
||||||
"fs-extra": "^0.12.0",
|
|
||||||
"browserify": "^4.1.8",
|
"browserify": "^4.1.8",
|
||||||
|
"chai": "^1.10.0",
|
||||||
"coffee-script": "^1.8.0",
|
"coffee-script": "^1.8.0",
|
||||||
"coffeeify": "^0.7.0",
|
"coffeeify": "^0.7.0",
|
||||||
|
"fs-extra": "^0.12.0",
|
||||||
"jshint": "^2.5.6",
|
"jshint": "^2.5.6",
|
||||||
"loopback": "^2.5.0",
|
"loopback": "^2.5.0",
|
||||||
"mocha": "^1.19.0",
|
"mocha": "^1.19.0",
|
||||||
"must": "^0.12.0",
|
|
||||||
"supertest": "^0.14.0"
|
"supertest": "^0.14.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var boot = require('../');
|
var boot = require('../');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var expect = require('must');
|
var expect = require('chai').expect;
|
||||||
var browserify = require('browserify');
|
var browserify = require('browserify');
|
||||||
var sandbox = require('./helpers/sandbox');
|
var sandbox = require('./helpers/sandbox');
|
||||||
var vm = require('vm');
|
var vm = require('vm');
|
||||||
|
@ -91,7 +91,7 @@ function browserifyTestApp(appDir, strategy, next) {
|
||||||
var bundlePath = sandbox.resolve('browser-app-bundle.js');
|
var bundlePath = sandbox.resolve('browser-app-bundle.js');
|
||||||
var out = fs.createWriteStream(bundlePath);
|
var out = fs.createWriteStream(bundlePath);
|
||||||
b.bundle().pipe(out);
|
b.bundle().pipe(out);
|
||||||
|
|
||||||
out.on('error', function(err) { return next(err); });
|
out.on('error', function(err) { return next(err); });
|
||||||
out.on('close', function() {
|
out.on('close', function() {
|
||||||
next(null, bundlePath);
|
next(null, bundlePath);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var boot = require('../');
|
var boot = require('../');
|
||||||
var fs = require('fs-extra');
|
var fs = require('fs-extra');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var expect = require('must');
|
var expect = require('chai').expect;
|
||||||
var sandbox = require('./helpers/sandbox');
|
var sandbox = require('./helpers/sandbox');
|
||||||
var appdir = require('./helpers/appdir');
|
var appdir = require('./helpers/appdir');
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ describe('compiler', function() {
|
||||||
var instructions = boot.compile(appdir.PATH);
|
var instructions = boot.compile(appdir.PATH);
|
||||||
expect(instructions.files.boot).to.eql([initJs]);
|
expect(instructions.files.boot).to.eql([initJs]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('supports `bootDirs` option', function() {
|
it('supports `bootDirs` option', function() {
|
||||||
appdir.createConfigFilesSync();
|
appdir.createConfigFilesSync();
|
||||||
var initJs = appdir.writeFileSync('custom-boot/init.js',
|
var initJs = appdir.writeFileSync('custom-boot/init.js',
|
||||||
|
@ -390,7 +390,7 @@ describe('compiler', function() {
|
||||||
});
|
});
|
||||||
expect(instructions.files.boot).to.eql([initJs]);
|
expect(instructions.files.boot).to.eql([initJs]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('supports `bootScripts` option', function() {
|
it('supports `bootScripts` option', function() {
|
||||||
appdir.createConfigFilesSync();
|
appdir.createConfigFilesSync();
|
||||||
var initJs = appdir.writeFileSync('custom-boot/init.js',
|
var initJs = appdir.writeFileSync('custom-boot/init.js',
|
||||||
|
@ -475,19 +475,19 @@ describe('compiler', function() {
|
||||||
sourceFile: path.resolve(appdir.PATH, 'models', 'car.coffee')
|
sourceFile: path.resolve(appdir.PATH, 'models', 'car.coffee')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('supports `modelSources` option', function() {
|
it('supports `modelSources` option', function() {
|
||||||
appdir.createConfigFilesSync({}, {}, {
|
appdir.createConfigFilesSync({}, {}, {
|
||||||
Car: { dataSource: 'db' }
|
Car: { dataSource: 'db' }
|
||||||
});
|
});
|
||||||
appdir.writeConfigFileSync('custom-models/car.json', { name: 'Car' });
|
appdir.writeConfigFileSync('custom-models/car.json', { name: 'Car' });
|
||||||
appdir.writeFileSync('custom-models/car.js', '');
|
appdir.writeFileSync('custom-models/car.js', '');
|
||||||
|
|
||||||
var instructions = boot.compile({
|
var instructions = boot.compile({
|
||||||
appRootDir: appdir.PATH,
|
appRootDir: appdir.PATH,
|
||||||
modelSources: ['./custom-models']
|
modelSources: ['./custom-models']
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(instructions.models).to.have.length(1);
|
expect(instructions.models).to.have.length(1);
|
||||||
expect(instructions.models[0]).to.eql({
|
expect(instructions.models[0]).to.eql({
|
||||||
name: 'Car',
|
name: 'Car',
|
||||||
|
|
|
@ -2,7 +2,7 @@ var boot = require('../');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var loopback = require('loopback');
|
var loopback = require('loopback');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var expect = require('must');
|
var expect = require('chai').expect;
|
||||||
var fs = require('fs-extra');
|
var fs = require('fs-extra');
|
||||||
var sandbox = require('./helpers/sandbox');
|
var sandbox = require('./helpers/sandbox');
|
||||||
var appdir = require('./helpers/appdir');
|
var appdir = require('./helpers/appdir');
|
||||||
|
|
Loading…
Reference in New Issue