This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const path = require("path"); | |
| function findInDir(dir, filter, fileList = []) { | |
| const files = fs.readdirSync(dir); | |
| files.forEach((file) => { | |
| const filePath = path.join(dir, file); | |
| const fileStat = fs.lstatSync(filePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const states = { | |
| idle: { | |
| on: { | |
| START: 'started', | |
| }, | |
| }, | |
| started: { | |
| entry: ['start'], | |
| on: { CLOSE: 'closed', COMPLETE: 'completed', PAUSE: 'paused' }, | |
| exit: [assign({ started: true })], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('expect-puppeteer'); | |
| const isCI = require('is-ci'); | |
| const path = require('path'); | |
| const { mkdirp, writeFile } = require('fs-extra'); | |
| const screenshotsPath = path.resolve(__dirname, '../reports/screenshots'); | |
| const toFilename = s => s.replace(/[^a-z0-9.-]+/gi, '_'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const extract = (text: string): Object => { | |
| const re = /\{+\s*(.*?)\s*\}+/g; | |
| const tags: any[] = []; | |
| let matches; | |
| while (Boolean((matches = re.exec(text)))) { | |
| if (matches) { | |
| tags.push(matches[1]); | |
| } | |
| } | |
| const root: any = {}; |