Skip to content

Commit 32f060f

Browse files
committed
fix 20
1 parent c1b59d9 commit 32f060f

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.circleci/config.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,7 @@ jobs:
123123
- run:
124124
name: Verify Compiled Files
125125
command: ls -R tests/e2e/dist/tests/
126-
- run:
127-
name: Run e2e tests
128-
command: |
129-
cd tests/e2e/dist
130-
# Include setup.js as the first test file
131-
export SETUP_TEST="tests/setup.js"
132-
export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.js" | circleci tests split --split-by=timings)
133-
# Combine setup test and other tests, filter out any non-js files or directories
134-
export COMBINED_TEST_FILES=$(echo -e "$SETUP_TEST\n$TEST_FILES" | grep -E '\.js$')
135-
echo "Running tests: $COMBINED_TEST_FILES"
136-
cd ../../..
137-
TEST_FILES="$COMBINED_TEST_FILES" .circleci/e2e/test.app.sh
126+
F
138127
- when:
139128
condition:
140129
equal: [ true, << parameters.report >> ]

tests/e2e/src/vscode.runner.ts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,31 @@ import { VScodeScripts } from './helpers/scripts/vscodeScripts'
5656
})
5757
}
5858

59-
let testFilesEnv: string | string[] = process.env.TEST_FILES!;
59+
let testFilesEnv: string | string[] = process.env.TEST_FILES!
6060
if (process.env.TEST_FILES) {
61-
testFilesEnv = process.env.TEST_FILES.split(' ').map((file) => {
62-
return path.join(__dirname, '..', 'dist', file);
63-
});
64-
65-
console.log('Full Paths:', testFilesEnv);
61+
testFilesEnv = process.env.TEST_FILES.split(' ').map(file => {
62+
return path.join(__dirname, '..', 'dist', file)
63+
})
64+
65+
// Always prepend setup.js
66+
const setupTestPath = path.join(
67+
__dirname,
68+
'..',
69+
'dist',
70+
'tests',
71+
'setup.js',
72+
)
73+
testFilesEnv.unshift(setupTestPath)
74+
75+
console.log('Full Paths:', testFilesEnv)
6676
} else {
67-
console.error('TEST_FILES environment variable is not defined.');
77+
console.error('TEST_FILES environment variable is not defined.')
6878
}
6979

7080
// Run tests
7181
await exTester.runTests(
72-
testFilesEnv || path.join(__dirname, '..', 'dist', 'tests', '**', '*.e2e.js'),
82+
testFilesEnv ||
83+
path.join(__dirname, '..', 'dist', 'tests', '**', '*.e2e.js'),
7384
{
7485
settings: 'settings.json',
7586
logLevel: logging.Level.INFO,

0 commit comments

Comments
 (0)