mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 17:51:51 +00:00
Fix incorrect expect
This commit is contained in:
parent
f0d59bc192
commit
59156ec89e
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ exports.expectError = function OErrorExpectError (e, expected) {
|
|||
expect(e.toString()).to.equal(expected.message)
|
||||
|
||||
// stack should start with the default error message formatting
|
||||
expect(e.stack.split('\n')[0], expected.name)
|
||||
expect(e.stack.split('\n')[0]).to.match(new RegExp(`^${expected.name}:`))
|
||||
|
||||
// first stack frame should be the function where the error was thrown
|
||||
expect(e.stack.split('\n')[1]).to.match(expected.firstFrameRx)
|
||||
|
|
Loading…
Reference in a new issue