MCPcopy
hub / github.com/sequelize/sequelize / validateError

Function validateError

test/integration/dialects/mysql/errors.test.js:13–23  ·  view source on GitHub ↗
(promise, errClass, errValues)

Source from the content-addressed store, hash-verified

11 describe('[MYSQL Specific] Errors', () => {
12
13 const validateError = async (promise, errClass, errValues) => {
14 const wanted = { ...errValues };
15
16 await expect(promise).to.have.been.rejectedWith(errClass);
17
18 try {
19 return await promise;
20 } catch (err) {
21 return Object.keys(wanted).forEach(k => expect(err[k]).to.eql(wanted[k]));
22 }
23 };
24
25 describe('ForeignKeyConstraintError', () => {
26 beforeEach(function() {

Callers 1

errors.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…