Skip to content

Commit

Permalink
test: generate browser/headless test suite
Browse files Browse the repository at this point in the history
Fixes: #315
  • Loading branch information
lance committed Apr 30, 2019
1 parent 1854f5c commit 2d24b35
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
18 changes: 18 additions & 0 deletions test/browser/generate-index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

echo $PWD

file_list=$(ls -1 test/*.js)
requires=""

for f in $file_list ; do
echo "Processing $(basename ${f})"
requires=$requires"require('../$(basename ${f})');"$'\n'
done

# echo $requires
cat > test/browser/index.js << EOF
// This is a generated file. Do not modify by hand
'use strict';
${requires}
EOF
15 changes: 8 additions & 7 deletions test/browser/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// webpack needs to know about all of our test files to generate
// its browser based bits. This is the entrypoint for browser/headless
// testing.
// This is a generated file. Do not modify by hand
'use strict';

// We have to hard code the test file names because fs.readdirSync
// and friends won't really work in a browser, now will they?
require('../enable-disable-test');
require('../circuit-shutdown-test.js');
require('../common.js');
require('../enable-disable-test.js');
require('../error-filter-test.js');
require('../half-open-test.js');
require('../health-check-test.js');
require('../hystrix-test.js');
require('../semaphore-test.js');
require('../test.js');
require('../volume-threshold-test.js');
require('../warmup-test.js');

0 comments on commit 2d24b35

Please sign in to comment.