Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to code v3 #589

Merged
merged 3 commits into from May 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -26,7 +26,7 @@
"source-map-support": "0.4.x"
},
"devDependencies": {
"code": "2.x.x",
"code": "3.x.x",
"cpr": "1.1.x",
"eslint-plugin-markdown": "1.0.0-beta.2",
"lab-event-reporter": "1.x.x",
Expand Down
16 changes: 8 additions & 8 deletions test/coverage.js
Expand Up @@ -90,7 +90,7 @@ describe('Coverage', () => {
}
});

expect(missedLines).to.deep.include([
expect(missedLines).to.include([
{ filename: 'test/coverage/while.js', lineNumber: '5', originalLineNumber: 11 },
{ filename: 'test/coverage/while.js', lineNumber: '6', originalLineNumber: 12 }
]);
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('Coverage', () => {
}
});

expect(missedLines).to.deep.include([
expect(missedLines).to.include([
{ filename: './while.js', lineNumber: '5', originalLineNumber: 11 },
{ filename: './while.js', lineNumber: '6', originalLineNumber: 12 }
]);
Expand Down Expand Up @@ -209,7 +209,7 @@ describe('Coverage', () => {
it('should work with loop labels', (done) => {

const Test = require('./coverage/loop-labels.js');
expect(Test.method()).to.deep.equal([1, 0]);
expect(Test.method()).to.equal([1, 0]);

const cov = Lab.coverage.analyze({ coveragePath: Path.join(__dirname, 'coverage/loop-labels') });
const source = cov.files[0].source;
Expand All @@ -225,7 +225,7 @@ describe('Coverage', () => {
}
});

expect(missedChunks).to.have.length(1).and.to.deep.equal([{ source: 'j < 1', miss: 'true' }]);
expect(missedChunks).to.have.length(1).and.to.equal([{ source: 'j < 1', miss: 'true' }]);

done();
});
Expand All @@ -245,8 +245,8 @@ describe('Coverage', () => {
const cov = Lab.coverage.analyze({ coveragePath: Path.join(__dirname, 'coverage/single-line-functions') });
const source = cov.files[0].source;
const missedLines = Object.keys(source).filter((lineNumber) => source[lineNumber].miss);
expect(results).to.deep.equal([7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 10, 5]);
expect(missedLines).to.deep.equal(['12', '15', '21', '27', '30', '33', '39', '46', '50', '53', '56']);
expect(results).to.equal([7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 10, 5]);
expect(missedLines).to.equal(['12', '15', '21', '27', '30', '33', '39', '46', '50', '53', '56']);
done();
});

Expand All @@ -259,7 +259,7 @@ describe('Coverage', () => {
const source = cov.files[0].source;
const missedLines = Object.keys(source).filter((lineNumber) => source[lineNumber].miss);
expect(result).to.equal(7);
expect(missedLines).to.deep.equal(['19', '22']);
expect(missedLines).to.equal(['19', '22']);
done();
});

Expand All @@ -280,7 +280,7 @@ describe('Coverage', () => {
return file.filename;
});

expect(sorted).to.deep.equal(['/a/b', '/a/c', '/a/b/a', '/a/b/c', '/a/c/b']);
expect(sorted).to.equal(['/a/b', '/a/c', '/a/b/a', '/a/b/c', '/a/c/b']);
done();
});
});
Expand Down
8 changes: 4 additions & 4 deletions test/linters.js
Expand Up @@ -31,7 +31,7 @@ describe('Linters - eslint', () => {

const checkedFile = eslintResults[0];
expect(checkedFile).to.include({ filename: Path.join(path, 'fail.js') });
expect(checkedFile.errors).to.deep.include([
expect(checkedFile.errors).to.include([
{ line: 13, severity: 'ERROR', message: 'semi - Missing semicolon.' },
{ line: 14, severity: 'WARNING', message: 'eol-last - Newline required at end of file but not found.' }
]);
Expand All @@ -53,7 +53,7 @@ describe('Linters - eslint', () => {

const checkedFile = eslintResults[0];
expect(checkedFile).to.include({ filename: Path.join(path, 'fail.js') });
expect(checkedFile.errors).to.deep.include([
expect(checkedFile.errors).to.include([
{ line: 13, severity: 'ERROR', message: 'semi - Missing semicolon.' },
{ line: 14, severity: 'WARNING', message: 'eol-last - Newline required at end of file but not found.' }
]);
Expand All @@ -75,9 +75,9 @@ describe('Linters - eslint', () => {

const checkedFile = eslintResults[0];
expect(checkedFile).to.include({ filename: Path.join(path, 'fail.js') });
expect(checkedFile.errors).to.deep.include([
expect(checkedFile.errors).to.include([
{ line: 14, severity: 'ERROR', message: 'eol-last - Newline required at end of file but not found.' }]);
expect(checkedFile.errors).to.not.deep.include({ line: 8, severity: 'ERROR', message: 'no-unused-vars - internals is defined but never used' });
expect(checkedFile.errors).to.not.include({ line: 8, severity: 'ERROR', message: 'no-unused-vars - internals is defined but never used' });
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/reporters.js
Expand Up @@ -435,7 +435,7 @@ describe('Reporter', () => {

script.test('works', (finished) => {

expect(['a', 'b']).to.deep.equal(['a', 'c']);
expect(['a', 'b']).to.equal(['a', 'c']);
finished();
});
});
Expand Down
14 changes: 7 additions & 7 deletions test/runner.js
Expand Up @@ -911,7 +911,7 @@ describe('Runner', () => {
Lab.execute(scripts, { dry: true, shuffle: true }, null, (err, notebook2) => {

expect(err).not.to.exist();
expect(notebook1.tests).to.not.deep.equal(notebook2.tests);
expect(notebook1.tests).to.not.equal(notebook2.tests);
Math.random = random;
done();
});
Expand Down Expand Up @@ -982,7 +982,7 @@ describe('Runner', () => {

expect(err).to.not.exist();
expect(notebook.tests[0].err).to.equal('\'before\' action failed');
expect(steps).to.deep.equal(['before']);
expect(steps).to.equal(['before']);
done();
});
});
Expand Down Expand Up @@ -1016,7 +1016,7 @@ describe('Runner', () => {

expect(err).to.not.exist();
expect(notebook.tests[0].err).to.equal('\'before each\' action failed');
expect(steps).to.deep.equal(['before']);
expect(steps).to.equal(['before']);
done();
});
});
Expand Down Expand Up @@ -1082,7 +1082,7 @@ describe('Runner', () => {
Lab.execute(script, null, null, (err, notebook) => {

expect(err).not.to.exist();
expect(steps).to.deep.equal([
expect(steps).to.equal([
'outer beforeEach',
'first test',
'outer afterEach 1',
Expand Down Expand Up @@ -1124,7 +1124,7 @@ describe('Runner', () => {
Lab.execute(script, { parallel: true }, null, (err, notebook) => {

expect(err).not.to.exist();
expect(steps).to.deep.equal(['2', '1']);
expect(steps).to.equal(['2', '1']);
done();
});
});
Expand Down Expand Up @@ -1154,7 +1154,7 @@ describe('Runner', () => {
Lab.execute(script, { parallel: true }, null, (err, notebook) => {

expect(err).not.to.exist();
expect(steps).to.deep.equal(['1', '2']);
expect(steps).to.equal(['1', '2']);
done();
});
});
Expand Down Expand Up @@ -1184,7 +1184,7 @@ describe('Runner', () => {
Lab.execute(script, null, null, (err, notebook) => {

expect(err).not.to.exist();
expect(steps).to.deep.equal(['2', '1']);
expect(steps).to.equal(['2', '1']);
done();
});
});
Expand Down
10 changes: 5 additions & 5 deletions test/utils.js
Expand Up @@ -35,7 +35,7 @@ describe('Utils', () => {
};

const merged = Utils.mergeOptions(parent, child);
expect(merged).to.deep.equal({ a: 1, b: 3, c: 4 });
expect(merged).to.equal({ a: 1, b: 3, c: 4 });
done();
});

Expand All @@ -47,7 +47,7 @@ describe('Utils', () => {
};

const merged = Utils.mergeOptions(parent, null);
expect(merged).to.deep.equal({ a: 1, b: 2 });
expect(merged).to.equal({ a: 1, b: 2 });
done();
});

Expand All @@ -59,7 +59,7 @@ describe('Utils', () => {
};

const merged = Utils.mergeOptions(null, child);
expect(merged).to.deep.equal({ b: 3, c: 4 });
expect(merged).to.equal({ b: 3, c: 4 });
done();
});

Expand All @@ -78,7 +78,7 @@ describe('Utils', () => {
};

const merged = Utils.mergeOptions(parent, child, ['e', 'f']);
expect(merged).to.deep.equal({ a: 1, b: 3, c: 4 });
expect(merged).to.equal({ a: 1, b: 3, c: 4 });
done();
});

Expand All @@ -97,7 +97,7 @@ describe('Utils', () => {
};

Utils.applyOptions(parent, child);
expect(parent).to.deep.equal({ a: 1, b: 3, c: 4, e: 5, f: 6 });
expect(parent).to.equal({ a: 1, b: 3, c: 4, e: 5, f: 6 });
done();
});
});