Remove example fixture file

This commit is contained in:
John Hildenbiddle
2020-07-23 00:44:23 -04:00
parent b50385cea8
commit b407a1cdc1
2 changed files with 6 additions and 8 deletions
+6 -1
View File
@@ -1,6 +1,5 @@
// Modules, constants, and variables
// -----------------------------------------------------------------------------
const add = require('./fixtures/add.js');
const docsifyInit = require('./helpers/docsifyInit');
const { URL: serverURL } = require('./config/server.js');
@@ -90,6 +89,12 @@ describe(`Example Tests`, function() {
// Get result of local function executed in browser context
// https://playwright.dev/#path=docs%2Fapi.md&q=pageevaluatepagefunction-arg
function add(...addends) {
return addends.reduce(
(accumulator, currentValue) => accumulator + currentValue
);
}
const functionResult = await page.evaluate(`
${add.toString()}
-7
View File
@@ -1,7 +0,0 @@
function add(...addends) {
return addends.reduce(
(accumulator, currentValue) => accumulator + currentValue
);
}
module.exports = add;