Skip to content

Commit

Permalink
Add a test for swc-project#1455
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Apr 1, 2021
1 parent 9061a32 commit e77debd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/fixture/issue-1455/case1/input/.swcrc
@@ -0,0 +1,15 @@
{
"exclude": [".*.js$", ".*.map$", ".*.test.ts$"],
"jsc": {
"target": "es2016",
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": true
}
},
"minify": false,
"module": {
"type": "commonjs"
}
}
10 changes: 10 additions & 0 deletions tests/fixture/issue-1455/case1/input/index.ts
@@ -0,0 +1,10 @@
const SampleData = typedModel("SampleVideo", VideosSchema, undefined, undefined, {
byPlatform: async function (platform: string) {
const result = await this.find({ platform: { $eq: platform } });
return result;
},
});

SampleData.byPlatform("youtube").then((res) => {
console.info(res);
});

0 comments on commit e77debd

Please sign in to comment.