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

Fix ownPropertyDescriptor tests #422

Merged
merged 2 commits into from Apr 7, 2015
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
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -55,6 +55,11 @@ test-phantom: build
@./node_modules/karma/bin/karma start \
--single-run --browsers PhantomJS

test-firefox: build
@printf "==> [Test :: Karma (Firefox)]\n"
@./node_modules/karma/bin/karma start \
--browsers Firefox

test-sauce: build
@printf "==> [Test :: Karma (Sauce)]\n"
@CHAI_TEST_ENV=sauce ./node_modules/karma/bin/karma start \
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -42,6 +42,7 @@
"karma-mocha": "*",
"karma-sauce-launcher": "0.2.x",
"karma-phantomjs-launcher": "0.1.1",
"karma-firefox-launcher": "^0.1.4",
"mocha": "1.21.x",
"istanbul": "0.2.x"
}
Expand Down
4 changes: 2 additions & 2 deletions test/expect.js
Expand Up @@ -547,7 +547,7 @@ describe('expect', function () {
expect(obj).to.have.ownPropertyDescriptor('test', descriptor);
err(function(){
expect(obj).not.to.have.ownPropertyDescriptor('test', descriptor, 'blah');
}, "blah: expected the own property descriptor for 'test' on { test: NaN } to not match { configurable: false,\n enumerable: true,\n writable: true,\n value: NaN }");
}, /^blah: expected the own property descriptor for 'test' on \{ test: NaN \} to not match \{ [^\}]+ \}$/);
err(function(){
var wrongDescriptor = {
configurable: false,
Expand All @@ -556,7 +556,7 @@ describe('expect', function () {
value: NaN
};
expect(obj).to.have.ownPropertyDescriptor('test', wrongDescriptor, 'blah');
}, "blah: expected the own property descriptor for 'test' on { test: NaN } to match { configurable: false,\n enumerable: true,\n writable: false,\n value: NaN }, got { value: NaN,\n writable: true,\n enumerable: true,\n configurable: false }");
}, /^blah: expected the own property descriptor for 'test' on \{ test: NaN \} to match \{ [^\}]+ \}, got \{ [^\}]+ \}$/);

err(function(){
expect(obj).to.have.ownPropertyDescriptor('test2', 'blah');
Expand Down
4 changes: 2 additions & 2 deletions test/should.js
Expand Up @@ -412,7 +412,7 @@ describe('should', function() {
obj.should.haveOwnPropertyDescriptor('test', descriptor);
err(function(){
obj.should.not.haveOwnPropertyDescriptor('test', descriptor, 'blah');
}, "blah: expected the own property descriptor for 'test' on { test: NaN } to not match { configurable: false,\n enumerable: true,\n writable: true,\n value: NaN }");
}, /^blah: expected the own property descriptor for 'test' on \{ test: NaN \} to not match \{ [^\}]+ \}$/);
err(function(){
var wrongDescriptor = {
configurable: false,
Expand All @@ -421,7 +421,7 @@ describe('should', function() {
value: NaN
};
obj.should.haveOwnPropertyDescriptor('test', wrongDescriptor, 'blah');
}, "blah: expected the own property descriptor for 'test' on { test: NaN } to match { configurable: false,\n enumerable: true,\n writable: false,\n value: NaN }, got { value: NaN,\n writable: true,\n enumerable: true,\n configurable: false }");
}, /^blah: expected the own property descriptor for 'test' on \{ test: NaN \} to match \{ [^\}]+ \}, got \{ [^\}]+ \}$/);

err(function(){
obj.should.haveOwnPropertyDescriptor('test2', 'blah');
Expand Down