diff --git a/__tests__/no-new-statics.js b/__tests__/no-new-statics.js index 4ced5e8..33ad0c1 100644 --- a/__tests__/no-new-statics.js +++ b/__tests__/no-new-statics.js @@ -53,18 +53,18 @@ ruleTester.run('no-new-statics', rule, { errors: [{ message: "Avoid calling 'new' on 'Promise.withResolvers()'" }], }, { - code: [ - 'function foo() {', - ' var a = getA()', - ' return new Promise.resolve(a)', - '}', - ].join('\n'), - output: [ - 'function foo() {', - ' var a = getA()', - ' return Promise.resolve(a)', - '}', - ].join('\n'), + code: ` + function foo() { + var a = getA() + return new Promise.resolve(a) + } + `, + output: ` + function foo() { + var a = getA() + return Promise.resolve(a) + } + `, errors: [{ message: "Avoid calling 'new' on 'Promise.resolve()'" }], }, ], diff --git a/__tests__/valid-params.js b/__tests__/valid-params.js index 5dd16e1..0993e35 100644 --- a/__tests__/valid-params.js +++ b/__tests__/valid-params.js @@ -78,16 +78,16 @@ ruleTester.run('valid-params', rule, { }, // integration test - [ - 'Promise.all([', - ' Promise.resolve(1),', - ' Promise.resolve(2),', - ' Promise.reject(Error()),', - '])', - ' .then(console.log)', - ' .catch(console.error)', - ' .finally(console.log)', - ].join('\n'), + ` + Promise.all([ + Promise.resolve(1), + Promise.resolve(2), + Promise.reject(Error()), + ]) + .then(console.log) + .catch(console.error) + .finally(console.log) + `, ], invalid: [ // invalid Promise.resolve()