parent
614cd14dc6
commit
9a06e8022e
@ -0,0 +1,14 @@ |
||||
#!/usr/bin/env bash |
||||
set -e |
||||
|
||||
yarn run build:e2e && node ./splice_tests.js |
||||
TESTFILES=$(./splice_tests.js | circleci tests split --split-by=timings) |
||||
for TESTFILE in $TESTFILES; do |
||||
yarn run test --test ${TESTFILE} || TEST_EXITCODE=1 |
||||
done |
||||
|
||||
echo "$TEST_EXITCODE" |
||||
if [ "$TEST_EXITCODE" -eq 1 ] |
||||
then |
||||
exit 1 |
||||
fi |
@ -0,0 +1,35 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
|
||||
// Directory to read files from
|
||||
const testDirectory = './build-e2e/remixdesktop/test/tests/app/'; |
||||
|
||||
// Function to read files in a directory and return their paths
|
||||
function getTestFiles(directory) { |
||||
return fs.readdirSync(directory) |
||||
.filter(file => file.endsWith('.test.js')) // Get only .test.js files
|
||||
.map(file => path.join(directory, file)); // Return full path of each file
|
||||
} |
||||
|
||||
// Function to check if a file contains a specific word
|
||||
function fileContainsWord(filePath, word) { |
||||
const content = fs.readFileSync(filePath, 'utf-8'); // Read file content
|
||||
return content.includes(word); // Check if word is in content
|
||||
} |
||||
|
||||
// Function to filter out files that do not contain the specified word
|
||||
function filterFilesByWord(files, word) { |
||||
return files.filter(file => fileContainsWord(file, word)); // Return files that do not contain the word
|
||||
} |
||||
|
||||
// Get all test files in the specified directory
|
||||
const testFiles = getTestFiles(testDirectory); |
||||
|
||||
// Filter out files that do not contain "@offline"
|
||||
const filteredFiles = filterFilesByWord(testFiles, ''); |
||||
|
||||
// Output the list of filtered files
|
||||
//console.log('Files without "@offline":', filteredFiles);
|
||||
for (let i = 0; i < filteredFiles.length; i++) { |
||||
console.log(filteredFiles[i]); |
||||
} |
Loading…
Reference in new issue