Auto-commit 2026-04-29 16:31

This commit is contained in:
2026-04-29 16:31:27 -04:00
parent e8687bb6b2
commit 0495ee5bd2
19691 changed files with 3272886 additions and 138 deletions

19
node_modules/avvio/test/lib/validate-plugin.test.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict'
const { test } = require('tap')
const { validatePlugin } = require('../../lib/validate-plugin')
const { AVV_ERR_PLUGIN_NOT_VALID } = require('../../lib/errors')
test('validatePlugin', (t) => {
t.plan(8)
t.throws(() => validatePlugin(1), new AVV_ERR_PLUGIN_NOT_VALID('number'))
t.throws(() => validatePlugin('function'), new AVV_ERR_PLUGIN_NOT_VALID('string'))
t.throws(() => validatePlugin({}), new AVV_ERR_PLUGIN_NOT_VALID('object'))
t.throws(() => validatePlugin([]), new AVV_ERR_PLUGIN_NOT_VALID('array'))
t.throws(() => validatePlugin(null), new AVV_ERR_PLUGIN_NOT_VALID('null'))
t.doesNotThrow(() => validatePlugin(function () {}))
t.doesNotThrow(() => validatePlugin(new Promise((resolve) => resolve)))
t.doesNotThrow(() => validatePlugin(Promise.resolve()))
})