-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add examples + launch configuration, so that it is easier to test reg…
…ression (#331) * Add examples + launch configuration, so that it is easier to test this repository
- Loading branch information
Showing
4 changed files
with
99 additions
and
1 deletion.
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
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,78 @@ | ||
describe('Example tests', () => { | ||
it('test with ', () => { | ||
expect(true); | ||
}); | ||
|
||
it("test with ' single quote", () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with " double quote', () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with () parenthesis', () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with [ square bracket', () => { | ||
expect(true); | ||
}); | ||
|
||
it(`test with | ||
lf`, () => { | ||
expect(true); | ||
}); | ||
|
||
it(`test with \nmanual lf`, () => { | ||
expect(true); | ||
}); | ||
|
||
it(`test with \r\nmanual crlf`, () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with %var%', () => { | ||
expect(true); | ||
}); | ||
|
||
const v = 'interpolated string'; | ||
it(`test with ${v}`, () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with $var', () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with `backticks`', () => { | ||
expect(true); | ||
}); | ||
|
||
it('test with regex .*$^|[]', () => { | ||
expect(true); | ||
}); | ||
}); | ||
|
||
// #311 | ||
it.each([1, 2])('test with generated %i', (id) => { | ||
expect(true); | ||
}); | ||
|
||
describe('nested', () => { | ||
describe('a', () => { | ||
it('b', () => { | ||
expect(true); | ||
}); | ||
}); | ||
}); | ||
|
||
// #299 | ||
class TestClass { | ||
myFunction() { | ||
// nothing | ||
} | ||
} | ||
it(TestClass.prototype.myFunction.name, () => { | ||
expect(true).toBe(true); | ||
}); |
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,4 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
}, | ||
"exclude": [ | ||
"node_modules", | ||
".vscode-test" | ||
".vscode-test", | ||
"examples" | ||
] | ||
} |