Skip to content

Commit

Permalink
Use Incremental Building to speed up testing locally
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferbaxter committed Jan 8, 2020
1 parent a227b53 commit 712d7b6
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ package-lock.json
.DS_Store
dist/
transpile/
transpile-tests/
coverage/*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"license": "Apache-2.0",
"scripts": {
"pretest": "rimraf dist transpile && tsc -p tsconfig.test.json & wait",
"pretest": "tsc -p tsconfig.test.json",
"test": "ava",
"precoverage": "yarn pretest && c8 ava",
"coverage": "c8 report --reporter=html",
Expand Down
2 changes: 1 addition & 1 deletion test/closure-config/prefer-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import options from '../../transpile/options';
import options from '../../transpile-tests/options';
import { generator } from '../generator';

test('platform unspecified is respected', t => {
Expand Down
2 changes: 1 addition & 1 deletion test/closure-config/rollup-config-externs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import compile from '../../transpile/options';
import compile from '../../transpile-tests/options';
import path from 'path';
import {promises as fsPromises} from 'fs';

Expand Down
2 changes: 1 addition & 1 deletion test/closure-config/rollup-config-to-flags.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import { defaults } from '../../transpile/options';
import { defaults } from '../../transpile-tests/options';

test.beforeEach(t => {
t.context = {
Expand Down
2 changes: 1 addition & 1 deletion test/closure-config/warning-level.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

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

test('with no language out set, and warnings set to verbose... an error is returned', t => {
try {
Expand Down
2 changes: 1 addition & 1 deletion test/error-reporting/warnings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import compiler from '../../transpile';
import compiler from '../../transpile-tests';
import * as rollup from 'rollup';
import { promises as fsPromises } from 'fs';
import { join } from 'path';
Expand Down
4 changes: 2 additions & 2 deletions test/export-cjs/export-cjs-extern.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import test from 'ava';
import { createTransforms } from '../../transpile/transforms';
import { defaults } from '../../transpile/options';
import { createTransforms } from '../../transpile-tests/transforms';
import { defaults } from '../../transpile-tests/options';
import { promises as fsPromises } from 'fs';

test('generate extern for cjs export pattern', async t => {
Expand Down
2 changes: 1 addition & 1 deletion test/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

const test = require('ava');
const { default: compiler } = require('../transpile/index');
const { default: compiler } = require('../transpile-tests/index');
const rollup = require('rollup');
const fs = require('fs');
const path = require('path');
Expand Down
4 changes: 2 additions & 2 deletions test/iife/iife-wrapped-safely.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import test from 'ava';
import { createTransforms } from '../../transpile/transforms';
import { defaults } from '../../transpile/options';
import { createTransforms } from '../../transpile-tests/transforms';
import { defaults } from '../../transpile-tests/options';
import { promises as fsPromises } from 'fs';
import { generator } from '../generator';

Expand Down
2 changes: 1 addition & 1 deletion test/provided-externs/multiple-bundles.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
const test = require('ava');
const path = require('path');
const rollup = require('rollup');
const { default: compiler } = require('../../transpile/index');
const { default: compiler } = require('../../transpile-tests/index');

const options = {
externs: [
Expand Down
2 changes: 1 addition & 1 deletion test/strict-removal/mjs-suffix.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

const test = require('ava');
const { default: compiler } = require('../../transpile/index');
const { default: compiler } = require('../../transpile-tests/index');
const rollup = require('rollup');
const fs = require('fs');
const path = require('path');
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"declaration": true,
"module": "esnext",
"allowSyntheticDefaultImports": true,
"incremental": true,
},
"include": [
"./**/*.ts",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs"
"module": "commonjs",
"outDir": "transpile-tests",
}
}

0 comments on commit 712d7b6

Please sign in to comment.