-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: refactor how fixtures are structured
- Loading branch information
1 parent
bd7ae78
commit a7fb750
Showing
4 changed files
with
54 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
|
||
import { describe } from 'mocha' | ||
import * as fs from 'fs' | ||
import * as path from 'path' | ||
import testFixtures from './testFixtures' | ||
|
||
const dirs = fs.readdirSync(__dirname) | ||
for (const dir of dirs) { | ||
if (fs.statSync(path.join(__dirname, dir)).isDirectory()) { | ||
describe(dir, function() { | ||
testFixtures({ | ||
glob: path.join(__dirname, dir, '*.ts'), | ||
transform: require(`../src/${dir}`), | ||
}) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters