-
-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb2722b
commit 7a1215f
Showing
14 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
test/execution-tests/3.0.1_projectReferencesDisabled/karma.conf.js
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,17 @@ | ||
/* eslint-disable no-var, strict */ | ||
'use strict'; | ||
var webpackConfig = require('./webpack.config.js'); | ||
var makeKarmaConfig = require('../../karmaConfig'); | ||
|
||
module.exports = function(config) { | ||
config.set( | ||
makeKarmaConfig({ | ||
config, | ||
webpackConfig, | ||
files: [ | ||
// This ensures we have the es6 shims in place from babel and then loads all the tests | ||
'main.js' | ||
] | ||
}) | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
test/execution-tests/3.0.1_projectReferencesDisabled/lib/.gitignore
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 @@ | ||
!*.js.map |
5 changes: 5 additions & 0 deletions
5
test/execution-tests/3.0.1_projectReferencesDisabled/lib/index.d.ts
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,5 @@ | ||
export declare const lib: { | ||
one: number; | ||
two: number; | ||
three: number; | ||
}; |
10 changes: 10 additions & 0 deletions
10
test/execution-tests/3.0.1_projectReferencesDisabled/lib/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test/execution-tests/3.0.1_projectReferencesDisabled/lib/index.js.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
test/execution-tests/3.0.1_projectReferencesDisabled/lib/index.ts
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,5 @@ | ||
export const lib = { | ||
one: 1, | ||
two: 2, | ||
three: 3 | ||
}; |
9 changes: 9 additions & 0 deletions
9
test/execution-tests/3.0.1_projectReferencesDisabled/lib/tsconfig.json
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"sourceMap": true | ||
}, | ||
"files": [ | ||
"./index.ts" | ||
] | ||
} |
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,2 @@ | ||
const testsContext = require.context('./', true, /\.tests\.ts(x?)$/); | ||
testsContext.keys().forEach(testsContext); |
10 changes: 10 additions & 0 deletions
10
test/execution-tests/3.0.1_projectReferencesDisabled/package.json
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,10 @@ | ||
{ | ||
"name": "basic", | ||
"license": "MIT", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"devDependencies": { | ||
"@types/jasmine": "^2.5.35", | ||
"jasmine-core": "^2.3.4" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
test/execution-tests/3.0.1_projectReferencesDisabled/src/app.ts
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,5 @@ | ||
import { lib } from '../lib'; | ||
|
||
export function whatNumbersDoYouHave() { | ||
return [lib.one, lib.two, lib.three]; | ||
} |
7 changes: 7 additions & 0 deletions
7
test/execution-tests/3.0.1_projectReferencesDisabled/test/app.tests.ts
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,7 @@ | ||
import { whatNumbersDoYouHave } from "../src/app"; | ||
|
||
describe("app", () => { | ||
it("code compiled using projectReferences can be consumed", () => { | ||
expect(whatNumbersDoYouHave()).toEqual([1, 2, 3]); | ||
}); | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/execution-tests/3.0.1_projectReferencesDisabled/tsconfig.json
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,11 @@ | ||
{ | ||
"files": [ | ||
"./src/app.ts" | ||
], | ||
"references": [ | ||
{ "path": "./lib" } | ||
], | ||
"compilerOptions": { | ||
"noEmitOnError": true | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
test/execution-tests/3.0.1_projectReferencesDisabled/webpack.config.js
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 @@ | ||
module.exports = { | ||
mode: 'development', | ||
entry: './src/app.ts', | ||
output: { | ||
filename: 'bundle.js' | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.js'] | ||
}, | ||
module: { | ||
rules: [ | ||
{ test: /\.ts$/, loader: 'ts-loader', options: { projectReferences: false } } | ||
] | ||
} | ||
} | ||
|
||
// for test harness purposes only, you would not need this in a normal project | ||
module.exports.resolveLoader = { alias: { 'ts-loader': require('path').join(__dirname, "../../../index.js") } } |
13 changes: 13 additions & 0 deletions
13
test/execution-tests/3.0.1_projectReferencesDisabled/yarn.lock
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,13 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@types/jasmine@^2.5.35": | ||
version "2.8.5" | ||
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.5.tgz#96e58872583fa80c7ea0dd29024b180d5e133678" | ||
integrity sha512-mkrHFZTgOXkZhau36K628iKFkjbp11t/bHCkY4Mefu4R6McMg2FD9P3naBv/0Ygyn4sz8baColJp2gdmSekgiw== | ||
|
||
jasmine-core@^2.3.4: | ||
version "2.9.1" | ||
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.9.1.tgz#b6bbc1d8e65250d56f5888461705ebeeeb88f22f" | ||
integrity sha1-trvB2OZSUNVvWIhGFwXr7uuI8i8= |