-
Notifications
You must be signed in to change notification settings - Fork 135
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
7119097
commit 2634a94
Showing
7 changed files
with
816 additions
and
30 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
examples/typescript/ts-step_shotgun_surgery-01_base/babel.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,6 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', {targets: {node: 'current'}}], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
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
5 changes: 0 additions & 5 deletions
5
examples/typescript/ts-step_shotgun_surgery-01_base/src/index.js
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
examples/typescript/ts-step_shotgun_surgery-01_base/src/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,9 @@ | ||
interface Course { | ||
title: string; | ||
} | ||
|
||
function courseTitle(course: Course) { | ||
return course.title; | ||
} | ||
|
||
module.exports = courseTitle; |
5 changes: 0 additions & 5 deletions
5
examples/typescript/ts-step_shotgun_surgery-01_base/tests/index.test.js
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
examples/typescript/ts-step_shotgun_surgery-01_base/tests/index.test.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,6 @@ | ||
const courseTitle = require('../src'); | ||
|
||
test('gets the course title', () => { | ||
const course = {title: 'Refactoring'} | ||
expect(courseTitle(course)).toBe('Refactoring') | ||
}); |
807 changes: 788 additions & 19 deletions
807
examples/typescript/ts-step_shotgun_surgery-01_base/yarn.lock
Large diffs are not rendered by default.
Oops, something went wrong.