Skip to content

Commit

Permalink
Merge pull request #5 from power-assert-js/espower2
Browse files Browse the repository at this point in the history
upgrade espower-source to 2.0.0
  • Loading branch information
twada authored Nov 12, 2016
2 parents bb22eb0 + 1df9b31 commit 546760e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
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

0 comments on commit 546760e

Please sign in to comment.