Skip to content

Commit 7dd97ea

Browse files
committed
test fixes
1 parent 08a7dca commit 7dd97ea

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Diff for: test/exec.test.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,11 @@ describe('Machine.prototype.exec()', function (){
266266
try {
267267
_origMachineInstance.exec(function (err) {
268268
if (err) {
269-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
270-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
269+
if (err.code === 'E_INVALID_ARGINS') {
270+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
271271
else { return done(); }
272272
}
273-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
273+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
274274
}
275275
else { return done(new Error('There should have been a validation error provided to this callback!')); }
276276
});
@@ -292,11 +292,11 @@ describe('Machine.prototype.exec()', function (){
292292
_origMachineInstance.exec({
293293
error: function (err) {
294294
if (err) {
295-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
296-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
295+
if (err.code === 'E_INVALID_ARGINS') {
296+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
297297
else { return done(); }
298298
}
299-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
299+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
300300
}
301301
else { return done(new Error('There should have been a validation error provided to this callback!')); }
302302
},
@@ -400,11 +400,11 @@ describe('Machine.prototype.exec()', function (){
400400
try {
401401
_origMachineInstance.exec(function (err) {
402402
if (err) {
403-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
404-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
403+
if (err.code === 'E_INVALID_ARGINS') {
404+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
405405
else { return done(); }
406406
}
407-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
407+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
408408
}
409409
else { return done(new Error('There should have been a validation error provided to this callback!')); }
410410
});
@@ -426,11 +426,11 @@ describe('Machine.prototype.exec()', function (){
426426
_origMachineInstance.exec({
427427
error: function (err) {
428428
if (err) {
429-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
430-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
429+
if (err.code === 'E_INVALID_ARGINS') {
430+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
431431
else { return done(); }
432432
}
433-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
433+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
434434
}
435435
else { return done(new Error('There should have been a validation error provided to this callback!')); }
436436
},
@@ -561,11 +561,11 @@ describe('Machine.prototype.exec()', function (){
561561
try {
562562
_origMachineInstance.exec(function (err) {
563563
if (err) {
564-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
565-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
564+
if (err.code === 'E_INVALID_ARGINS') {
565+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
566566
else { return done(); }
567567
}
568-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
568+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
569569
}
570570
else { return done(new Error('There should have been a validation error provided to this callback!')); }
571571
});
@@ -616,11 +616,11 @@ describe('Machine.prototype.exec()', function (){
616616
try {
617617
_origMachineInstance.exec(function (err) {
618618
if (err) {
619-
if (err.code === 'E_MACHINE_RUNTIME_VALIDATION') {
620-
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_MACHINE_RUNTIME_VALIDATION` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
619+
if (err.code === 'E_INVALID_ARGINS') {
620+
if (err.machineInstance !== _origMachineInstance) { return done(new Error('The `E_INVALID_ARGINS` error should have had a `machineInstance` property which is the same reference as the original machine instance-- but instead, got: '+util.inspect(err.machineInstance, {depth: null}))); }
621621
else { return done(); }
622622
}
623-
else { return done(new Error('Error should have had `code: \'E_MACHINE_RUNTIME_VALIDATION\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
623+
else { return done(new Error('Error should have had `code: \'E_INVALID_ARGINS\', but instead, got: `'+err.code+'`. Here is the stack:'+err.stack)); }
624624
}
625625
else { return done(new Error('There should have been a validation error provided to this callback!')); }
626626
});

0 commit comments

Comments
 (0)