initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
19
github/codeql-action-v1/node_modules/@sinonjs/samsam/lib/create-matcher/assert-method-exists.js
generated
vendored
Normal file
19
github/codeql-action-v1/node_modules/@sinonjs/samsam/lib/create-matcher/assert-method-exists.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Throws a TypeError when expected method doesn't exist
|
||||
*
|
||||
* @private
|
||||
* @param {*} value A value to examine
|
||||
* @param {string} method The name of the method to look for
|
||||
* @param {name} name A name to use for the error message
|
||||
* @param {string} methodPath The name of the method to use for error messages
|
||||
* @throws {TypeError} When the method doesn't exist
|
||||
*/
|
||||
function assertMethodExists(value, method, name, methodPath) {
|
||||
if (value[method] === null || value[method] === undefined) {
|
||||
throw new TypeError(`Expected ${name} to have method ${methodPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = assertMethodExists;
|
||||
Loading…
Add table
Add a link
Reference in a new issue