Skip to content

Commit 712d7b6

Browse files
Use Incremental Building to speed up testing locally
1 parent a227b53 commit 712d7b6

14 files changed

+17
-14
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ package-lock.json
44
.DS_Store
55
dist/
66
transpile/
7+
transpile-tests/
78
coverage/*

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"license": "Apache-2.0",
2222
"scripts": {
23-
"pretest": "rimraf dist transpile && tsc -p tsconfig.test.json & wait",
23+
"pretest": "tsc -p tsconfig.test.json",
2424
"test": "ava",
2525
"precoverage": "yarn pretest && c8 ava",
2626
"coverage": "c8 report --reporter=html",

test/closure-config/prefer-config.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import test from 'ava';
18-
import options from '../../transpile/options';
18+
import options from '../../transpile-tests/options';
1919
import { generator } from '../generator';
2020

2121
test('platform unspecified is respected', t => {

test/closure-config/rollup-config-externs.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import test from 'ava';
18-
import compile from '../../transpile/options';
18+
import compile from '../../transpile-tests/options';
1919
import path from 'path';
2020
import {promises as fsPromises} from 'fs';
2121

test/closure-config/rollup-config-to-flags.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import test from 'ava';
18-
import { defaults } from '../../transpile/options';
18+
import { defaults } from '../../transpile-tests/options';
1919

2020
test.beforeEach(t => {
2121
t.context = {

test/closure-config/warning-level.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import test from 'ava';
18-
import compile, {ERROR_WARNINGS_ENABLED_LANGUAGE_OUT_UNSPECIFIED, ERROR_WARNINGS_ENABLED_LANGUAGE_OUT_INVALID} from '../../transpile/options';
18+
import compile, {ERROR_WARNINGS_ENABLED_LANGUAGE_OUT_UNSPECIFIED, ERROR_WARNINGS_ENABLED_LANGUAGE_OUT_INVALID} from '../../transpile-tests/options';
1919

2020
test('with no language out set, and warnings set to verbose... an error is returned', t => {
2121
try {

test/error-reporting/warnings.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import test from 'ava';
18-
import compiler from '../../transpile';
18+
import compiler from '../../transpile-tests';
1919
import * as rollup from 'rollup';
2020
import { promises as fsPromises } from 'fs';
2121
import { join } from 'path';

test/export-cjs/export-cjs-extern.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
import test from 'ava';
18-
import { createTransforms } from '../../transpile/transforms';
19-
import { defaults } from '../../transpile/options';
18+
import { createTransforms } from '../../transpile-tests/transforms';
19+
import { defaults } from '../../transpile-tests/options';
2020
import { promises as fsPromises } from 'fs';
2121

2222
test('generate extern for cjs export pattern', async t => {

test/generator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
const test = require('ava');
18-
const { default: compiler } = require('../transpile/index');
18+
const { default: compiler } = require('../transpile-tests/index');
1919
const rollup = require('rollup');
2020
const fs = require('fs');
2121
const path = require('path');

test/iife/iife-wrapped-safely.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
import test from 'ava';
18-
import { createTransforms } from '../../transpile/transforms';
19-
import { defaults } from '../../transpile/options';
18+
import { createTransforms } from '../../transpile-tests/transforms';
19+
import { defaults } from '../../transpile-tests/options';
2020
import { promises as fsPromises } from 'fs';
2121
import { generator } from '../generator';
2222

test/provided-externs/multiple-bundles.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
const test = require('ava');
1818
const path = require('path');
1919
const rollup = require('rollup');
20-
const { default: compiler } = require('../../transpile/index');
20+
const { default: compiler } = require('../../transpile-tests/index');
2121

2222
const options = {
2323
externs: [

test/strict-removal/mjs-suffix.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
const test = require('ava');
18-
const { default: compiler } = require('../../transpile/index');
18+
const { default: compiler } = require('../../transpile-tests/index');
1919
const rollup = require('rollup');
2020
const fs = require('fs');
2121
const path = require('path');

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"declaration": true,
1919
"module": "esnext",
2020
"allowSyntheticDefaultImports": true,
21+
"incremental": true,
2122
},
2223
"include": [
2324
"./**/*.ts",

tsconfig.test.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"module": "commonjs"
4+
"module": "commonjs",
5+
"outDir": "transpile-tests",
56
}
67
}

0 commit comments

Comments
 (0)