Skip to content

Commit

Permalink
New: Add a test for TypeScript support
Browse files Browse the repository at this point in the history
  • Loading branch information
pspeter3 authored and phated committed Jan 3, 2019
1 parent 113b240 commit eb9f26d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"require-ini": "0.0.1",
"require-xml": "0.0.1",
"require-yaml": "0.0.1",
"toml-require": "^1.0.1"
"toml-require": "^1.0.1",
"typescript-register": "^1.0.6"
},
"keywords": [
"require",
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var test = {
data: {
trueKey: true,
falseKey: false,
subKey: {
subProp: 1
}
}
};

export = test;
4 changes: 4 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ describe('registerFor', function () {
rechoir.registerFor('./test/fixtures/test.iced.md');
expect(require('./fixtures/test.iced.md')).to.deep.equal(expected);
});
it('should know ts', function () {
rechoir.registerFor('./test/fixtures/test.ts');
expect(require('./fixtures/test.ts')).to.deep.equal(expected);
});
it('should know toml', function () {
rechoir.registerFor('./test/fixtures/test.toml');
expect(require('./fixtures/test.toml')).to.deep.equal(expected);
Expand Down

0 comments on commit eb9f26d

Please sign in to comment.