Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 572cd2d

Browse files
committed
generalizes test runners
1 parent 95f9bd5 commit 572cd2d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tests/test-core/browser.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ describe('IPFS Repo Tests on the Browser', function () {
4848
testsContext
4949
.keys()
5050
.filter((key) => {
51-
if (key === './test-swarm-node.js' ||
52-
key === './test-swarm-node') {
53-
return false
54-
} else {
55-
return true
56-
}
51+
return !(key.endsWith('-node.js') || key.endsWith('-node'))
5752
})
5853
.forEach((key) => {
5954
testsContext(key)

tests/test-core/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ describe('core', () => {
2727
const tests = fs.readdirSync(__dirname)
2828
tests.filter((file) => {
2929
if (file === 'index.js' ||
30-
file === 'browser.js' ||
31-
file === 'test-swarm-browser.js') {
30+
file.endsWith('browser.js')) {
3231
return false
3332
} else {
3433
return true

0 commit comments

Comments
 (0)