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

upgrade espower-source to 2.0.0 #5

Merged
merged 1 commit into from
Nov 12, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
},
"dependencies": {
"convert-source-map": "^1.1.0",
"espower-source": "^1.0.0",
"espower-source": "^2.0.0",
"minimatch": "^3.0.0",
"source-map-support": "^0.3.0",
"xtend": "^4.0.0"
},
"devDependencies": {
"empower": "^1.0.0",
"expect.js": "^0.3.1",
"jshint": "~2.8.0",
"mocha": "^2.2.5",
"power-assert-formatter": "^1.0.0"
"power-assert": "^1.4.2"
},
"engines": {
"node": ">= 0.8.0"
Expand Down
4 changes: 1 addition & 3 deletions test/not_tobe_instrumented/not_instrumented_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var assert = empower(require('assert'), formatter);
var assert = require('assert');
var expect = require('expect.js');

describe('power-assert client should work with not-instrumented code', function () {
Expand Down
10 changes: 4 additions & 6 deletions test/tobe_instrumented/tobe_instrumented_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var assert = empower(require('assert'), formatter);
var assert = require('assert');
var expect = require('expect.js');

describe('power-assert message', function () {
Expand All @@ -21,7 +19,7 @@ describe('power-assert message', function () {
' => 3',
' [number] three * (seven * ten)',
' => 210'
], 11, 13);
], 9, 13);
});

it('equal with Literal and Identifier: assert.equal(1, minusOne);', function () {
Expand All @@ -32,7 +30,7 @@ describe('power-assert message', function () {
' assert.equal(1, minusOne)',
' | ',
' -1 '
], 30, 20);
], 28, 20);
});

beforeEach(function () {
Expand All @@ -44,7 +42,7 @@ describe('power-assert message', function () {
return line;
}));
expect(e.stack).to.match(new RegExp("test\/tobe_instrumented\/tobe_instrumented_test.js:" + expectedLine + ":" + expectedColumn + "\n"));
expect(e.stack).to.match(new RegExp("AssertionError:\\s*\\#\\s*test\/tobe_instrumented\/tobe_instrumented_test.js:" + expectedLine + "\n"));
expect(e.message).to.match(new RegExp("\\s*\\#\\s*test\/tobe_instrumented\/tobe_instrumented_test.js:" + expectedLine + "\n"));
return;
}
expect().fail("AssertionError should be thrown");
Expand Down