Skip to content
Snippets Groups Projects
Commit 379d0e63 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: fix gen.js path

parent 8e8e6dc5
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,8 @@ const path = require('path') ...@@ -3,7 +3,8 @@ const path = require('path')
const glob = require('glob') const glob = require('glob')
describe('> generating screenshot', () => { describe('> generating screenshot', () => {
let childProcess let childProcess
const matches = glob.sync('**/*.e2e-screenshot.js', { cwd: path.join(__dirname, '../src') }) const matchCwdPath = path.join(__dirname, '../src')
const matches = glob.sync('**/*.e2e-screenshot.js', { cwd: matchCwdPath })
const cwdPath = path.join(__dirname, '../../deploy/') const cwdPath = path.join(__dirname, '../../deploy/')
beforeAll(done => { beforeAll(done => {
...@@ -18,7 +19,7 @@ describe('> generating screenshot', () => { ...@@ -18,7 +19,7 @@ describe('> generating screenshot', () => {
}) })
for (const match of matches) { for (const match of matches) {
const requirePath = path.join(cwdPath, match) const requirePath = path.join(matchCwdPath, match)
require(requirePath) require(requirePath)
} }
afterAll(() => { afterAll(() => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment