From 379d0e63cee921d66861a90c8e60a629df96c0cf Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Tue, 14 Apr 2020 18:02:18 +0200
Subject: [PATCH] bugfix: fix gen.js path

---
 e2e/screenshots/gen.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/e2e/screenshots/gen.js b/e2e/screenshots/gen.js
index 18a17d20e..9bd57e9f1 100644
--- a/e2e/screenshots/gen.js
+++ b/e2e/screenshots/gen.js
@@ -3,7 +3,8 @@ const path = require('path')
 const glob = require('glob')
 describe('> generating screenshot', () => {
   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/')
   
   beforeAll(done => {
@@ -18,7 +19,7 @@ describe('> generating screenshot', () => {
   })
 
   for (const match of matches) {
-    const requirePath = path.join(cwdPath, match)
+    const requirePath = path.join(matchCwdPath, match)
     require(requirePath)
   }
   afterAll(() => {
-- 
GitLab