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

Function validateError

test/integration/dialects/mariadb/errors.test.js:12–22  ·  view source on GitHub ↗
(promise, errClass, errValues)

Source from the content-addressed store, hash-verified

10describe('[MariaDB Specific] Errors', () => {
11
12 const validateError = async (promise, errClass, errValues) => {
13 const wanted = { ...errValues };
14
15 await expect(promise).to.have.been.rejectedWith(errClass);
16
17 try {
18 return await promise;
19 } catch (err) {
20 return Object.keys(wanted).forEach(k => expect(err[k]).to.eql(wanted[k]));
21 }
22 };
23
24 describe('ForeignKeyConstraintError', () => {
25 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…