refactor(tests): rename e2e tests

This commit is contained in:
Alexey Kasyanchuk 2018-02-03 13:59:26 +03:00
parent 936612c913
commit 6646381a49
3 changed files with 3 additions and 3 deletions

View File

@ -5,15 +5,15 @@ const base = require("./webpack.base.config");
// Test files are scattered through the whole project. Here we're searching // Test files are scattered through the whole project. Here we're searching
// for them and generating entry file for webpack. // for them and generating entry file for webpack.
const e2eDir = jetpack.cwd("e2e"); const e2eDir = jetpack.cwd("tests");
const tempDir = jetpack.cwd("temp"); const tempDir = jetpack.cwd("temp");
const entryFilePath = tempDir.path("e2e_entry.js"); const entryFilePath = tempDir.path("e2e_entry.js");
const entryFileContent = e2eDir const entryFileContent = e2eDir
.find({ matching: "*.e2e.js" }) .find({ matching: "*.test.js" })
.reduce((fileContent, path) => { .reduce((fileContent, path) => {
const normalizedPath = path.replace(/\\/g, "/"); const normalizedPath = path.replace(/\\/g, "/");
return `${fileContent}import "../e2e/${normalizedPath}";\n`; return `${fileContent}import "../tests/${normalizedPath}";\n`;
}, ""); }, "");
jetpack.write(entryFilePath, entryFileContent); jetpack.write(entryFilePath, entryFileContent);