Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test-domain-implicit-fs: make it pass on windows
Browse files Browse the repository at this point in the history
The error message is slightly different on windows. However there was no
need to verify the exact error message - there are assert()s that check
all the properties of the error object.
  • Loading branch information
piscisaureus committed Jun 15, 2012
1 parent 283d735 commit 8ccb3cb
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions test/simple/test-domain-implicit-fs.js
Expand Up @@ -34,20 +34,13 @@ var e = new events.EventEmitter();

d.on('error', function(er) {
console.error('caught', er);
switch (er.message) {
case "ENOENT, open 'this file does not exist'":
assert.equal(er.domain, d);
assert.equal(er.domain_thrown, true);
assert.ok(!er.domain_emitter);
assert.equal(er.code, 'ENOENT');
assert.equal(er.path, 'this file does not exist');
assert.equal(typeof er.errno, 'number');
break;

default:
console.error('unexpected error, throwing %j', er.message);
throw er;
}
assert.strictEqual(er.domain, d);
assert.strictEqual(er.domain_thrown, true);
assert.ok(!er.domain_emitter);
assert.strictEqual(er.code, 'ENOENT');
assert.ok(/\bthis file does not exist\b/i.test(er.path));
assert.strictEqual(typeof er.errno, 'number');

caught++;
});
Expand Down

0 comments on commit 8ccb3cb

Please sign in to comment.