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,19 @@
var test = require("tap").test;
var chain = require('../../');
var produce = require('../produce.js');
// See issue https://github.com/AndreasMadsen/stack-chain/issues/12 for
// a detailed explaination.
test("formatter works for non-generic (non-safe) toString", function (t) {
var base = function () {}
base.toString = base.toString // sets base.toString to base[[proto]].toString
Object.setPrototypeOf(base, {}); // sets base[[proto]] = {}
var error = Object.create(base); // wrap base using prototype chain
Error.captureStackTrace(error); // prepear error.stack
t.equal(error.stack.split('\n').length, 11);
t.end();
});