Skip to content

Commit 229899a

Browse files
committed
tests: Inline compile() function
1 parent c363fe5 commit 229899a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/tests/debug-tools-test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,6 @@ let cases = {
434434
},
435435
}
436436

437-
function compile(source, transformOptions) {
438-
return transform(source, transformOptions);
439-
}
440-
441437
Object.keys(cases).forEach(caseName => {
442438
describe(caseName, () => {
443439
let ep = 0;
@@ -467,11 +463,11 @@ function test(caseName, cases, assertionName, ep) {
467463

468464
if (expectationExists) {
469465
let expectation = fs.readFileSync(`./fixtures/${assertionName}/expectation.js`, 'utf-8');
470-
let compiled = compile(sample, options);
466+
let compiled = transform(sample, options);
471467
expect(compiled.code).to.equal(expectation);
472468

473469
} else {
474-
let fn = () => compile(sample, options);
470+
let fn = () => transform(sample, options);
475471
expect(fn).to.throw(new RegExp(cases[caseName].errors[ep++]));
476472
}
477473
}

0 commit comments

Comments
 (0)