refactor(Cypress): add nodemodules

This commit is contained in:
2021-09-02 17:18:41 +02:00
parent 1aa57bbd0a
commit bc6e1bc12e
4238 changed files with 340975 additions and 8 deletions

View File

@@ -0,0 +1,29 @@
var test = require("tap").test;
var chain = require('../../');
test("non extensible Error objects don't throw", function(t) {
var error = new Error("don't extend me");
Object.preventExtensions(error)
t.doesNotThrow(function() {
error.stack;
});
t.end();
});
test('stack is correct on non extensible error object', function (t) {
var error = new Error("don't extend me");
Object.preventExtensions(error);
chain.format.replace(function () {
return 'good';
});
try {
t.equal(error.stack, 'good');
} catch (e) { t.ifError(e); }
chain.format.restore();
t.end();
});