This repository has been archived by the owner on Dec 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 179
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
7b86044
commit d7a8a64
Showing
13 changed files
with
104 additions
and
94 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ tscommand | |
npm-debug.log | ||
.awcache | ||
test/output | ||
src/test/output |
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
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
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
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
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,8 @@ | ||
/** | ||
* @param {number} a - a | ||
* @param {number} b - b | ||
* @return {number} | ||
*/ | ||
module.exports = function mul(a, b) { | ||
return a * b; | ||
} |
This file was deleted.
Oops, something went wrong.
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 { sum } from './lib'; | ||
import { mul } from './exclude/ignored'; | ||
|
||
sum('asdf', /asdf/); | ||
|
||
// should be any | ||
mul('asdf', /asdf/); |
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,8 @@ | ||
/** | ||
* @param {number} a - a | ||
* @param {number} b - b | ||
* @return {number} | ||
*/ | ||
export function sum(a, b) { | ||
return a + b; | ||
} |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import { | ||
cleanAndCompile, expect, readOutputFile, | ||
fixturePath, readFixture, expectSource, createConfig | ||
cleanAndCompile, expect, | ||
fixturePath, createConfig | ||
} from './utils'; | ||
|
||
describe('salsa test', function() { | ||
xit('should compile js file', async function() { | ||
it('should compile js file', async function() { | ||
let config = { | ||
entry: fixturePath(['salsa', 'index.js']) | ||
entry: fixturePath(['salsa', 'index.ts']) | ||
}; | ||
|
||
let tsconfig = fixturePath(['salsa', 'tsconfig.json']); | ||
let loaderParams = `&tsconfig=${tsconfig}`; | ||
let exclude = [ /exclude/ ]; | ||
|
||
let stats = await cleanAndCompile(createConfig(config, { loaderParams })); | ||
expect(stats.compilation.errors.length).eq(1); | ||
let stats = await cleanAndCompile(createConfig(config, { loaderParams, exclude })); | ||
expect(stats.compilation.errors.length).eq(2); | ||
expect(stats.compilation.errors[0].toString()).include('Cannot find module'); | ||
expect(stats.compilation.errors[1].toString()).include(`Argument of type 'string'`); | ||
}); | ||
}); |
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