Regenerating node_modules

This commit is contained in:
Chris Raynor 2020-09-14 10:42:37 +01:00
parent 09b4a82c83
commit c96f84308a
No known key found for this signature in database
GPG key ID: 579A1FBC36FDA261
5488 changed files with 487362 additions and 60779 deletions

View file

@ -0,0 +1,52 @@
/**
* @fileoverview Blah
* @author El
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var rule = require("../../../lib/no-async-foreach"),
RuleTester = require("eslint").RuleTester;
//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
const ERROR_MSG = 'No async function in forEachs';
var ruleTester = new RuleTester();
ruleTester.run("no-async-foreach", rule, {
valid: [
{
code: "[].forEach(() => {})",
parserOptions: { ecmaVersion: 8 }
},
{
code: "[].forEach(function() {})",
parserOptions: { ecmaVersion: 8 }
}
],
invalid: [
{
code: "[].forEach(async () => {});",
parserOptions: { ecmaVersion: 8 },
errors: [{
message: ERROR_MSG,
}]
},
{
code: "[].forEach(async function() {});",
parserOptions: { ecmaVersion: 8 },
errors: [{
message: ERROR_MSG,
}]
}
]
});