@hg-ts/tests 0.1.49 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -1
- package/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-lint$colon$ts.log +2 -0
- package/.turbo/turbo-test.log +20 -0
- package/dist/decorators/decorate-test.js +1 -2
- package/dist/decorators/decorate-test.js.map +1 -1
- package/dist/decorators/describe.decorator.d.ts +3 -2
- package/dist/decorators/describe.decorator.d.ts.map +1 -1
- package/dist/decorators/describe.decorator.js +3 -4
- package/dist/decorators/describe.decorator.js.map +1 -1
- package/dist/decorators/expect-error.decorator.d.ts +0 -1
- package/dist/decorators/expect-error.decorator.d.ts.map +1 -1
- package/dist/decorators/expect-error.decorator.js +1 -2
- package/dist/decorators/expect-error.decorator.js.map +1 -1
- package/dist/decorators/suite.decorator.d.ts +4 -0
- package/dist/decorators/suite.decorator.d.ts.map +1 -0
- package/dist/decorators/suite.decorator.js +10 -0
- package/dist/decorators/suite.decorator.js.map +1 -0
- package/dist/decorators/test.decorator.d.ts +2 -9
- package/dist/decorators/test.decorator.d.ts.map +1 -1
- package/dist/decorators/test.decorator.js +1 -2
- package/dist/decorators/test.decorator.js.map +1 -1
- package/dist/example.test.d.ts +9 -0
- package/dist/example.test.d.ts.map +1 -0
- package/dist/example.test.js +54 -0
- package/dist/example.test.js.map +1 -0
- package/dist/expection.d.ts +0 -3
- package/dist/expection.d.ts.map +1 -1
- package/dist/expection.js +0 -1
- package/dist/expection.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/runner.d.ts +9 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +54 -0
- package/dist/runner.js.map +1 -0
- package/dist/suite.d.ts +11 -0
- package/dist/suite.d.ts.map +1 -0
- package/dist/suite.js +12 -0
- package/dist/suite.js.map +1 -0
- package/dist/test-runner.d.ts +5 -5
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +18 -37
- package/dist/test-runner.js.map +1 -1
- package/dist/test-suite.d.ts +4 -3
- package/dist/test-suite.d.ts.map +1 -1
- package/dist/test-suite.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/eslint.config.mjs +3 -0
- package/package.json +23 -24
- package/src/decorators/decorate-test.ts +1 -1
- package/src/decorators/describe.decorator.ts +6 -7
- package/src/decorators/test.decorator.ts +7 -13
- package/src/example.test.ts +30 -0
- package/src/expection.ts +0 -6
- package/src/index.ts +1 -3
- package/src/runner.ts +84 -0
- package/src/suite.ts +19 -0
- package/src/types.ts +11 -0
- package/tsconfig.json +1 -1
- package/.eslintrc.json +0 -1
- package/bin/test-dev.mjs +0 -4
- package/bin/test.mjs +0 -1
- package/config/base.cjs +0 -30
- package/config/common.cjs +0 -6
- package/config/esm.cjs +0 -14
- package/config/index.cjs +0 -1
- package/dist-esm/decorators/decorate-test.d.ts +0 -4
- package/dist-esm/decorators/decorate-test.d.ts.map +0 -1
- package/dist-esm/decorators/decorate-test.js +0 -15
- package/dist-esm/decorators/decorate-test.js.map +0 -1
- package/dist-esm/decorators/describe.decorator.d.ts +0 -3
- package/dist-esm/decorators/describe.decorator.d.ts.map +0 -1
- package/dist-esm/decorators/describe.decorator.js +0 -7
- package/dist-esm/decorators/describe.decorator.js.map +0 -1
- package/dist-esm/decorators/expect-error.decorator.d.ts +0 -3
- package/dist-esm/decorators/expect-error.decorator.d.ts.map +0 -1
- package/dist-esm/decorators/expect-error.decorator.js +0 -18
- package/dist-esm/decorators/expect-error.decorator.js.map +0 -1
- package/dist-esm/decorators/index.d.ts +0 -4
- package/dist-esm/decorators/index.d.ts.map +0 -1
- package/dist-esm/decorators/index.js +0 -4
- package/dist-esm/decorators/index.js.map +0 -1
- package/dist-esm/decorators/test.decorator.d.ts +0 -10
- package/dist-esm/decorators/test.decorator.d.ts.map +0 -1
- package/dist-esm/decorators/test.decorator.js +0 -8
- package/dist-esm/decorators/test.decorator.js.map +0 -1
- package/dist-esm/expection.d.ts +0 -6
- package/dist-esm/expection.d.ts.map +0 -1
- package/dist-esm/expection.js +0 -4
- package/dist-esm/expection.js.map +0 -1
- package/dist-esm/index.d.ts +0 -5
- package/dist-esm/index.d.ts.map +0 -1
- package/dist-esm/index.js +0 -5
- package/dist-esm/index.js.map +0 -1
- package/dist-esm/test-runner.d.ts +0 -16
- package/dist-esm/test-runner.d.ts.map +0 -1
- package/dist-esm/test-runner.js +0 -69
- package/dist-esm/test-runner.js.map +0 -1
- package/dist-esm/test-suite.d.ts +0 -10
- package/dist-esm/test-suite.d.ts.map +0 -1
- package/dist-esm/test-suite.js +0 -8
- package/dist-esm/test-suite.js.map +0 -1
- package/eslint.junit.xml +0 -31
- package/src/test-runner.ts +0 -117
- package/src/test-suite.ts +0 -17
- package/tsconfig.esm.json +0 -9
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/decorate-test.ts":"1","/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/describe.decorator.ts":"2","/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/expect-error.decorator.ts":"3","/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/index.ts":"4","/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/test.decorator.ts":"5","/Volumes/Work/ts/hg/framework/packages/tests/src/expection.ts":"6","/Volumes/Work/ts/hg/framework/packages/tests/src/index.ts":"7","/Volumes/Work/ts/hg/framework/packages/tests/src/test-runner.ts":"8","/Volumes/Work/ts/hg/framework/packages/tests/src/test-suite.ts":"9"},{"size":690,"mtime":1664329600892,"results":"10","hashOfConfig":"11"},{"size":218,"mtime":1626299896349,"results":"12","hashOfConfig":"11"},{"size":448,"mtime":1664329482818,"results":"13","hashOfConfig":"11"},{"size":114,"mtime":1626299896350,"results":"14","hashOfConfig":"11"},{"size":539,"mtime":1657490375779,"results":"15","hashOfConfig":"11"},{"size":218,"mtime":1657493281168,"results":"16","hashOfConfig":"11"},{"size":169,"mtime":1665300013486,"results":"17","hashOfConfig":"11"},{"size":2989,"mtime":1664319237830,"results":"18","hashOfConfig":"11"},{"size":380,"mtime":1660866296753,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1w9mpck",{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","suppressedMessages":"40","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","suppressedMessages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","suppressedMessages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/decorate-test.ts",[],["47"],"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/describe.decorator.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/expect-error.decorator.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/index.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/decorators/test.decorator.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/expection.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/index.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/test-runner.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/tests/src/test-suite.ts",[],[],{"ruleId":"48","severity":2,"message":"49","line":12,"column":11,"nodeType":"50","messageId":"51","endLine":12,"endColumn":15,"suppressions":"52"},"@typescript-eslint/no-this-alias","Unexpected aliasing of 'this' to local variable.","Identifier","thisAssignment",["53"],{"kind":"54","justification":"55"},"directive",""]
|
|
1
|
+
[{"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/decorate-test.js":"1","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/describe.decorator.js":"2","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/expect-error.decorator.js":"3","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/index.js":"4","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/suite.decorator.js":"5","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/test.decorator.js":"6","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/example.test.js":"7","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/expection.js":"8","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/index.js":"9","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/runner.js":"10","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/suite.js":"11","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/test-runner.js":"12","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/test-suite.js":"13","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/types.js":"14","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/eslint.config.mjs":"15","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/decorate-test.ts":"16","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/describe.decorator.ts":"17","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/expect-error.decorator.ts":"18","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/index.ts":"19","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/test.decorator.ts":"20","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/example.test.ts":"21","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/expection.ts":"22","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/index.ts":"23","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/runner.ts":"24","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/suite.ts":"25","/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/types.ts":"26"},{"size":584,"mtime":1746292860509,"results":"27","hashOfConfig":"28"},{"size":305,"mtime":1746292860519,"results":"29","hashOfConfig":"28"},{"size":690,"mtime":1746292860511,"results":"30","hashOfConfig":"28"},{"size":336,"mtime":1746292860522,"results":"31","hashOfConfig":"28"},{"size":312,"mtime":1746286930302,"results":"32","hashOfConfig":"28"},{"size":335,"mtime":1746292860520,"results":"33","hashOfConfig":"28"},{"size":2108,"mtime":1746292860525,"results":"34","hashOfConfig":"28"},{"size":269,"mtime":1746292860506,"results":"35","hashOfConfig":"28"},{"size":911,"mtime":1746292860527,"results":"36","hashOfConfig":"28"},{"size":2219,"mtime":1746292860517,"results":"37","hashOfConfig":"28"},{"size":287,"mtime":1746292860514,"results":"38","hashOfConfig":"28"},{"size":2240,"mtime":1746286930306,"results":"39","hashOfConfig":"28"},{"size":308,"mtime":1746286930307,"results":"40","hashOfConfig":"28"},{"size":110,"mtime":1746292860512,"results":"41","hashOfConfig":"28"},{"size":59,"mtime":1736896000127,"results":"42","hashOfConfig":"28"},{"size":683,"mtime":1736893466021,"results":"43","hashOfConfig":"44"},{"size":301,"mtime":1739849068953,"results":"45","hashOfConfig":"44"},{"size":448,"mtime":1736876770679,"results":"46","hashOfConfig":"44"},{"size":114,"mtime":1739849068897,"results":"47","hashOfConfig":"44"},{"size":352,"mtime":1739848974334,"results":"48","hashOfConfig":"44"},{"size":579,"mtime":1739865909461,"results":"49","hashOfConfig":"44"},{"size":123,"mtime":1739865923099,"results":"50","hashOfConfig":"44"},{"size":136,"mtime":1739849081534,"results":"51","hashOfConfig":"44"},{"size":2202,"mtime":1739848925318,"results":"52","hashOfConfig":"44"},{"size":435,"mtime":1739849355780,"results":"53","hashOfConfig":"44"},{"size":254,"mtime":1739848929342,"results":"54","hashOfConfig":"44"},{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gtnk1i",{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","suppressedMessages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","suppressedMessages":"72","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","suppressedMessages":"75","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","suppressedMessages":"78","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","suppressedMessages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","suppressedMessages":"84","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","suppressedMessages":"87","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"88","messages":"89","suppressedMessages":"90","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"91","messages":"92","suppressedMessages":"93","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"94","messages":"95","suppressedMessages":"96","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"97","messages":"98","suppressedMessages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"100","messages":"101","suppressedMessages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i5df87",{"filePath":"103","messages":"104","suppressedMessages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","suppressedMessages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","suppressedMessages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","suppressedMessages":"114","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","suppressedMessages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","suppressedMessages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","suppressedMessages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/decorate-test.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/describe.decorator.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/expect-error.decorator.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/suite.decorator.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/decorators/test.decorator.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/example.test.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/expection.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/runner.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/suite.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/test-runner.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/test-suite.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/dist/types.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/eslint.config.mjs",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/decorate-test.ts",[],["133"],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/describe.decorator.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/expect-error.decorator.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/decorators/test.decorator.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/example.test.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/expection.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/runner.ts",[],["134","135"],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/suite.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/tests/src/types.ts",[],[],{"ruleId":"136","severity":2,"message":"137","line":12,"column":11,"nodeType":"138","messageId":"139","endLine":12,"endColumn":15,"suppressions":"140"},{"ruleId":"141","severity":2,"message":"142","line":24,"column":3,"nodeType":"143","messageId":"144","endLine":32,"endColumn":5,"suggestions":"145","suppressions":"146"},{"ruleId":"141","severity":2,"message":"142","line":65,"column":3,"nodeType":"143","messageId":"144","endLine":69,"endColumn":14,"suggestions":"147","suppressions":"148"},"@typescript/no-this-alias","Unexpected aliasing of 'this' to local variable.","Identifier","thisAssignment",["149"],"@typescript/no-floating-promises","Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.","ExpressionStatement","floatingVoid",["150","151"],["152"],["153","154"],["155"],{"kind":"156","justification":"157"},{"messageId":"158","fix":"159","desc":"160"},{"messageId":"161","fix":"162","desc":"163"},{"kind":"156","justification":"157"},{"messageId":"158","fix":"164","desc":"160"},{"messageId":"161","fix":"165","desc":"163"},{"kind":"156","justification":"157"},"directive","","floatingFixVoid",{"range":"166","text":"167"},"Add void operator to ignore.","floatingFixAwait",{"range":"168","text":"169"},"Add await operator.",{"range":"170","text":"167"},{"range":"171","text":"169"},[456,456],"void ",[456,456],"await ",[1602,1602],[1602,1602]]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
[32m✔ dist/decorators/decorate-test.js [90m(125.202167ms)[39m[39m
|
|
3
|
+
▶ ExampleTestSuite
|
|
4
|
+
[32m✔ success [90m(0.710875ms)[39m[39m
|
|
5
|
+
[32m✔ failed [90m(0.867042ms)[39m[39m
|
|
6
|
+
[32m✔ todo [90m(0.334625ms)[39m # TODO[39m
|
|
7
|
+
[90m﹣ skip [90m(0.082542ms)[39m # SKIP[39m
|
|
8
|
+
[32m✔ only [90m(0.161541ms)[39m[39m
|
|
9
|
+
[34m ℹ 'only' and 'runOnly' require the --test-only command-line option.[39m
|
|
10
|
+
[32m✔ ExampleTestSuite [90m(2.91725ms)[39m[39m
|
|
11
|
+
[32m✔ dist/test-runner.js [90m(197.480417ms)[39m[39m
|
|
12
|
+
[32m✔ dist/test-suite.js [90m(125.113875ms)[39m[39m
|
|
13
|
+
[34mℹ tests 8[39m
|
|
14
|
+
[34mℹ suites 1[39m
|
|
15
|
+
[34mℹ pass 6[39m
|
|
16
|
+
[34mℹ fail 0[39m
|
|
17
|
+
[34mℹ cancelled 0[39m
|
|
18
|
+
[34mℹ skipped 1[39m
|
|
19
|
+
[34mℹ todo 1[39m
|
|
20
|
+
[34mℹ duration_ms 237.942291[39m
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTestDecorator =
|
|
3
|
+
exports.createTestDecorator = createTestDecorator;
|
|
4
4
|
function createTestDecorator(decorator) {
|
|
5
5
|
function result(_target, _key, descriptor) {
|
|
6
6
|
return {
|
|
@@ -15,5 +15,4 @@ function createTestDecorator(decorator) {
|
|
|
15
15
|
}
|
|
16
16
|
return result;
|
|
17
17
|
}
|
|
18
|
-
exports.createTestDecorator = createTestDecorator;
|
|
19
18
|
//# sourceMappingURL=decorate-test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorate-test.js","sourceRoot":"","sources":["../../src/decorators/decorate-test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decorate-test.js","sourceRoot":"","sources":["../../src/decorators/decorate-test.ts"],"names":[],"mappings":";;AAEA,kDAmBC;AAnBD,SAAgB,mBAAmB,CAAC,SAAwB;IAC3D,SAAS,MAAM,CACd,OAAgB,EAChB,IAAY,EACZ,UAA0E;QAE1E,OAAO;YACN,KAAK,CAAC,KAAK,CAAC,GAAG,IAAe;gBAE7B,MAAM,IAAI,GAAG,IAAI,CAAC;gBAClB,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;gBAChC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;oBAClC,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;gBAC7C,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;IAED,OAAO,MAAyB,CAAC;AAClC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { SuiteConstructor } from '../suite';
|
|
2
|
+
import { TestOptions } from '../types';
|
|
3
|
+
export declare function Describe<T extends SuiteConstructor>(options?: TestOptions): TypedClassDecorator<T>;
|
|
3
4
|
//# sourceMappingURL=describe.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/describe.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"describe.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/describe.decorator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,SAAS,gBAAgB,EAAE,OAAO,GAAE,WAAgB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAItG"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Describe =
|
|
4
|
-
const
|
|
3
|
+
exports.Describe = Describe;
|
|
4
|
+
const runner_1 = require("../runner");
|
|
5
5
|
function Describe(options = {}) {
|
|
6
6
|
return (target) => {
|
|
7
|
-
|
|
7
|
+
runner_1.Runner.run(target, options);
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
exports.Describe = Describe;
|
|
11
10
|
//# sourceMappingURL=describe.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.decorator.js","sourceRoot":"","sources":["../../src/decorators/describe.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"describe.decorator.js","sourceRoot":"","sources":["../../src/decorators/describe.decorator.ts"],"names":[],"mappings":";;AAIA,4BAIC;AARD,sCAAmC;AAInC,SAAgB,QAAQ,CAA6B,UAAuB,EAAE;IAC7E,OAAO,CAAC,MAAS,EAAQ,EAAE;QAC1B,eAAM,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expect-error.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expect-error.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,eAAe,CAazE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExpectException =
|
|
3
|
+
exports.ExpectException = ExpectException;
|
|
4
4
|
const expection_1 = require("../expection");
|
|
5
5
|
const decorate_test_1 = require("./decorate-test");
|
|
6
6
|
function ExpectException(error) {
|
|
@@ -18,5 +18,4 @@ function ExpectException(error) {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
exports.ExpectException = ExpectException;
|
|
22
21
|
//# sourceMappingURL=expect-error.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expect-error.decorator.js","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expect-error.decorator.js","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":";;AAGA,0CAaC;AAhBD,4CAAsC;AACtC,mDAAsD;AAEtD,SAAgB,eAAe,CAAC,KAAwB;IACvD,OAAO,IAAA,mCAAmB,EAAC,KAAK,EAAC,MAA2B,EAAE,EAAE;QAC/D,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC;YACJ,MAAM,MAAM,EAAE,CAAC;QAChB,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACvB,YAAY,GAAG,IAAI,CAAC;YACpB,IAAA,kBAAM,EAAC,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;gBAAS,CAAC;YACV,IAAA,kBAAM,EAAC,YAAY,CAAC,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suite.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/suite.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,WAAW,EAEhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,wBAAgB,KAAK,CAAC,CAAC,SAAS,oBAAoB,EAAE,OAAO,GAAE,WAAgB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAIvG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Suite = Suite;
|
|
4
|
+
const test_runner_1 = require("../test-runner");
|
|
5
|
+
function Suite(options = {}) {
|
|
6
|
+
return (target) => {
|
|
7
|
+
test_runner_1.TestRunner.run(target, options);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=suite.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suite.decorator.js","sourceRoot":"","sources":["../../src/decorators/suite.decorator.ts"],"names":[],"mappings":";;AAMA,sBAIC;AAVD,gDAGwB;AAGxB,SAAgB,KAAK,CAAiC,UAAuB,EAAE;IAC9E,OAAO,CAAC,MAAS,EAAQ,EAAE;QAC1B,wBAAU,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
name?: string;
|
|
4
|
-
only?: boolean;
|
|
5
|
-
skip?: boolean;
|
|
6
|
-
todo?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type Method<Arguments extends any[] = never> = (...args: Arguments) => Promise<void> | void;
|
|
9
|
-
export declare function Test(options?: Options): MethodDecorator;
|
|
1
|
+
import type { TestOptions } from '../types';
|
|
2
|
+
export declare function Test(options?: TestOptions): MethodDecorator;
|
|
10
3
|
//# sourceMappingURL=test.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/test.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/test.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,WAAW,EACX,MAAM,UAAU,CAAC;AAGlB,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,eAAe,CAU/D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Test =
|
|
3
|
+
exports.Test = Test;
|
|
4
4
|
function Test(options = {}) {
|
|
5
5
|
return (target, propertyKey) => {
|
|
6
6
|
const suite = target;
|
|
@@ -8,5 +8,4 @@ function Test(options = {}) {
|
|
|
8
8
|
suite.testsMap.set(propertyKey, options);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.Test = Test;
|
|
12
11
|
//# sourceMappingURL=test.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.decorator.js","sourceRoot":"","sources":["../../src/decorators/test.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test.decorator.js","sourceRoot":"","sources":["../../src/decorators/test.decorator.ts"],"names":[],"mappings":";;AAMA,oBAUC;AAVD,SAAgB,IAAI,CAAC,UAAuB,EAAE;IAC7C,OAAO,CACN,MAAc,EACd,WAAuB,EAChB,EAAE;QACT,MAAM,KAAK,GAAG,MAAe,CAAC;QAE9B,KAAK,CAAC,QAAQ,KAAK,IAAI,GAAG,EAAE,CAAC;QAC7B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Suite } from './suite';
|
|
2
|
+
export declare class ExampleTestSuite extends Suite {
|
|
3
|
+
success(): Promise<void>;
|
|
4
|
+
failed(): Promise<void>;
|
|
5
|
+
todo(): Promise<void>;
|
|
6
|
+
skip(): Promise<void>;
|
|
7
|
+
only(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=example.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.test.d.ts","sourceRoot":"","sources":["../src/example.test.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBACa,gBAAiB,SAAQ,KAAK;IAE7B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAMxB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAGrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAGrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExampleTestSuite = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const decorators_1 = require("./decorators");
|
|
6
|
+
const expection_1 = require("./expection");
|
|
7
|
+
const suite_1 = require("./suite");
|
|
8
|
+
let ExampleTestSuite = class ExampleTestSuite extends suite_1.Suite {
|
|
9
|
+
async success() {
|
|
10
|
+
(0, expection_1.expect)(true).toBeTruthy();
|
|
11
|
+
}
|
|
12
|
+
async failed() {
|
|
13
|
+
(0, expection_1.expect)(false).toBeTruthy();
|
|
14
|
+
}
|
|
15
|
+
async todo() { }
|
|
16
|
+
async skip() { }
|
|
17
|
+
async only() { }
|
|
18
|
+
};
|
|
19
|
+
exports.ExampleTestSuite = ExampleTestSuite;
|
|
20
|
+
tslib_1.__decorate([
|
|
21
|
+
(0, decorators_1.Test)(),
|
|
22
|
+
tslib_1.__metadata("design:type", Function),
|
|
23
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
24
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
25
|
+
], ExampleTestSuite.prototype, "success", null);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, decorators_1.ExpectException)(Error),
|
|
28
|
+
(0, decorators_1.Test)(),
|
|
29
|
+
tslib_1.__metadata("design:type", Function),
|
|
30
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
31
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
32
|
+
], ExampleTestSuite.prototype, "failed", null);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, decorators_1.Test)({ todo: true }),
|
|
35
|
+
tslib_1.__metadata("design:type", Function),
|
|
36
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
37
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
38
|
+
], ExampleTestSuite.prototype, "todo", null);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, decorators_1.Test)({ skip: true }),
|
|
41
|
+
tslib_1.__metadata("design:type", Function),
|
|
42
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
43
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
44
|
+
], ExampleTestSuite.prototype, "skip", null);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, decorators_1.Test)({ only: true }),
|
|
47
|
+
tslib_1.__metadata("design:type", Function),
|
|
48
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
49
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
50
|
+
], ExampleTestSuite.prototype, "only", null);
|
|
51
|
+
exports.ExampleTestSuite = ExampleTestSuite = tslib_1.__decorate([
|
|
52
|
+
(0, decorators_1.Describe)()
|
|
53
|
+
], ExampleTestSuite);
|
|
54
|
+
//# sourceMappingURL=example.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.test.js","sourceRoot":"","sources":["../src/example.test.ts"],"names":[],"mappings":";;;;AAAA,6CAIsB;AACtB,2CAAqC;AACrC,mCAAgC;AAGzB,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,aAAK;IAE7B,AAAN,KAAK,CAAC,OAAO;QACnB,IAAA,kBAAM,EAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAIY,AAAN,KAAK,CAAC,MAAM;QAClB,IAAA,kBAAM,EAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC;IAGY,AAAN,KAAK,CAAC,IAAI,KAAmB,CAAC;IAGxB,AAAN,KAAK,CAAC,IAAI,KAAmB,CAAC;IAGxB,AAAN,KAAK,CAAC,IAAI,KAAmB,CAAC;CACrC,CAAA;AApBY,4CAAgB;AAEf;IADZ,IAAA,iBAAI,GAAE;;;;+CAGN;AAIY;IAFZ,IAAA,4BAAe,EAAC,KAAK,CAAC;IACtB,IAAA,iBAAI,GAAE;;;;8CAGN;AAGY;IADZ,IAAA,iBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;;;4CACgB;AAGxB;IADZ,IAAA,iBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;;;4CACgB;AAGxB;IADZ,IAAA,iBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;;;4CACgB;2BAnBzB,gBAAgB;IAD5B,IAAA,qBAAQ,GAAE;GACE,gBAAgB,CAoB5B"}
|
package/dist/expection.d.ts
CHANGED
package/dist/expection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expection.d.ts","sourceRoot":"","sources":["../src/expection.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"expection.d.ts","sourceRoot":"","sources":["../src/expection.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,QAAQ,CAAC;AAMhC,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/expection.js
CHANGED
package/dist/expection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expection.js","sourceRoot":"","sources":["../src/expection.ts"],"names":[],"mappings":";;;;AAAA,4DAAgC;
|
|
1
|
+
{"version":3,"file":"expection.js","sourceRoot":"","sources":["../src/expection.ts"],"names":[],"mappings":";;;;AAAA,4DAAgC;AAMT,iBANhB,gBAAU,CAMY"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.expect = exports.
|
|
4
|
-
require("@hg-ts/types");
|
|
3
|
+
exports.expect = exports.Suite = exports.ExpectException = exports.Test = exports.Describe = void 0;
|
|
5
4
|
var decorators_1 = require("./decorators");
|
|
6
5
|
Object.defineProperty(exports, "Describe", { enumerable: true, get: function () { return decorators_1.Describe; } });
|
|
7
6
|
Object.defineProperty(exports, "Test", { enumerable: true, get: function () { return decorators_1.Test; } });
|
|
8
7
|
Object.defineProperty(exports, "ExpectException", { enumerable: true, get: function () { return decorators_1.ExpectException; } });
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "
|
|
8
|
+
var suite_1 = require("./suite");
|
|
9
|
+
Object.defineProperty(exports, "Suite", { enumerable: true, get: function () { return suite_1.Suite; } });
|
|
11
10
|
var expection_1 = require("./expection");
|
|
12
11
|
Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return expection_1.expect; } });
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAAtD,sGAAA,QAAQ,OAAA;AAAE,kGAAA,IAAI,OAAA;AAAE,6GAAA,eAAe,OAAA;AAExC,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,yCAAqC;AAA5B,mGAAA,MAAM,OAAA"}
|
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SuiteConstructor } from './suite';
|
|
2
|
+
import type { TestOptions } from './types';
|
|
3
|
+
export declare class Runner {
|
|
4
|
+
static run(suiteConstructor: SuiteConstructor, options?: TestOptions): void;
|
|
5
|
+
private static describe;
|
|
6
|
+
private static registerTests;
|
|
7
|
+
private static getTestMethod;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAS,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAGX,WAAW,EACX,MAAM,SAAS,CAAC;AAEjB,qBAAa,MAAM;WACJ,GAAG,CAChB,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,GAAE,WAAgB,GACvB,IAAI;IAaP,OAAO,CAAC,MAAM,CAAC,QAAQ;IAwBvB,OAAO,CAAC,MAAM,CAAC,aAAa;IAa5B,OAAO,CAAC,MAAM,CAAC,aAAa;CAY5B"}
|
package/dist/runner.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Runner = void 0;
|
|
4
|
+
const node_test_1 = require("node:test");
|
|
5
|
+
const expection_1 = require("./expection");
|
|
6
|
+
class Runner {
|
|
7
|
+
static run(suiteConstructor, options = {}) {
|
|
8
|
+
(0, node_test_1.describe)(options.name ?? suiteConstructor.name, {
|
|
9
|
+
skip: options.skip ?? false,
|
|
10
|
+
todo: options.todo ?? false,
|
|
11
|
+
only: options.only ?? false,
|
|
12
|
+
}, this.describe.bind(this, suiteConstructor));
|
|
13
|
+
}
|
|
14
|
+
static describe(suiteConstructor, context) {
|
|
15
|
+
const suite = new suiteConstructor(context);
|
|
16
|
+
suite.testsMap = suiteConstructor.prototype.testsMap;
|
|
17
|
+
(0, node_test_1.before)(async () => suite.setUp());
|
|
18
|
+
(0, node_test_1.after)(async () => suite.tearDown());
|
|
19
|
+
(0, node_test_1.beforeEach)(async () => suite.beforeEach());
|
|
20
|
+
(0, node_test_1.afterEach)(async () => {
|
|
21
|
+
expection_1.expect.setState({
|
|
22
|
+
assertionCalls: 0,
|
|
23
|
+
expectedAssertionsNumber: null,
|
|
24
|
+
isExpectingAssertions: false,
|
|
25
|
+
});
|
|
26
|
+
await suite.afterEach();
|
|
27
|
+
});
|
|
28
|
+
if (!suite.testsMap) {
|
|
29
|
+
suite.testsMap = new Map();
|
|
30
|
+
}
|
|
31
|
+
suite.testsMap.forEach((options, methodName) => this.registerTests(suite, options, methodName));
|
|
32
|
+
}
|
|
33
|
+
static registerTests(suite, options, testName) {
|
|
34
|
+
const { name = testName.toString() } = options;
|
|
35
|
+
const method = this.getTestMethod(suite, testName);
|
|
36
|
+
(0, node_test_1.test)(name, {
|
|
37
|
+
only: options.only ?? false,
|
|
38
|
+
todo: options.todo ?? false,
|
|
39
|
+
skip: options.skip ?? false,
|
|
40
|
+
}, method);
|
|
41
|
+
}
|
|
42
|
+
static getTestMethod(suite, methodName) {
|
|
43
|
+
const testMethod = suite[methodName].bind(suite);
|
|
44
|
+
return async (...args) => {
|
|
45
|
+
await testMethod(...args);
|
|
46
|
+
const { expectedAssertionsNumber, assertionCalls } = expection_1.expect.getState();
|
|
47
|
+
if (typeof expectedAssertionsNumber === 'number') {
|
|
48
|
+
(0, expection_1.expect)(assertionCalls).toBe(expectedAssertionsNumber);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Runner = Runner;
|
|
54
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":";;;AAAA,yCAQmB;AACnB,2CAAqC;AAQrC,MAAa,MAAM;IACX,MAAM,CAAC,GAAG,CAChB,gBAAkC,EAClC,UAAuB,EAAE;QAGzB,IAAA,oBAAQ,EACP,OAAO,CAAC,IAAI,IAAI,gBAAgB,CAAC,IAAI,EACrC;YACC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;YAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;YAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;SAC3B,EACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAC1C,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAC,gBAAkC,EAAE,OAAqB;QAChF,MAAM,KAAK,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC5C,KAAK,CAAC,QAAQ,GAAG,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC;QAErD,IAAA,kBAAM,EAAC,KAAK,IAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QACjC,IAAA,iBAAK,EAAC,KAAK,IAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEnC,IAAA,sBAAU,EAAC,KAAK,IAAG,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1C,IAAA,qBAAS,EAAC,KAAK,IAAG,EAAE;YACnB,kBAAM,CAAC,QAAQ,CAAC;gBACf,cAAc,EAAE,CAAC;gBACjB,wBAAwB,EAAE,IAAI;gBAC9B,qBAAqB,EAAE,KAAK;aAC5B,CAAC,CAAC;YACH,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACrB,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC5B,CAAC;QAED,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IACjG,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAY,EAAE,OAAoB,EAAE,QAAoB;QACpF,MAAM,EAAE,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC;QAE/C,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAGnD,IAAA,gBAAI,EAAC,IAAI,EAAE;YACV,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;YAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;YAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;SAC3B,EAAE,MAAM,CAAC,CAAC;IACZ,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAY,EAAE,UAAsB;QAChE,MAAM,UAAU,GAAK,KAAa,CAAC,UAAU,CAA2C,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAErG,OAAO,KAAK,EAAC,GAAG,IAAW,EAAiB,EAAE;YAC7C,MAAM,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;YAC1B,MAAM,EAAE,wBAAwB,EAAE,cAAc,EAAE,GAAG,kBAAM,CAAC,QAAQ,EAAE,CAAC;YAEvE,IAAI,OAAO,wBAAwB,KAAK,QAAQ,EAAE,CAAC;gBAClD,IAAA,kBAAM,EAAC,cAAc,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YACvD,CAAC;QACF,CAAC,CAAC;IACH,CAAC;CACD;AAlED,wBAkEC"}
|
package/dist/suite.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SuiteContext } from 'node:test';
|
|
2
|
+
import type { MethodName, TestOptions } from './types';
|
|
3
|
+
export type SuiteConstructor = new (context: SuiteContext) => Suite;
|
|
4
|
+
export declare abstract class Suite {
|
|
5
|
+
testsMap: Map<MethodName, TestOptions> | null;
|
|
6
|
+
setUp(): Promise<void>;
|
|
7
|
+
tearDown(): Promise<void>;
|
|
8
|
+
beforeEach(): Promise<void>;
|
|
9
|
+
afterEach(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=suite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suite.d.ts","sourceRoot":"","sources":["../src/suite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EACX,UAAU,EACV,WAAW,EACX,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,gBAAgB,GAAG,KAAK,OAAO,EAAE,YAAY,KAAK,KAAK,CAAC;AAEpE,8BAAsB,KAAK;IACnB,QAAQ,EAAE,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAExC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAEtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAEzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAE3B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CACvC"}
|
package/dist/suite.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Suite = void 0;
|
|
4
|
+
class Suite {
|
|
5
|
+
testsMap;
|
|
6
|
+
async setUp() { }
|
|
7
|
+
async tearDown() { }
|
|
8
|
+
async beforeEach() { }
|
|
9
|
+
async afterEach() { }
|
|
10
|
+
}
|
|
11
|
+
exports.Suite = Suite;
|
|
12
|
+
//# sourceMappingURL=suite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suite.js","sourceRoot":"","sources":["../src/suite.ts"],"names":[],"mappings":";;;AAQA,MAAsB,KAAK;IACnB,QAAQ,CAAsC;IAE9C,KAAK,CAAC,KAAK,KAAmB,CAAC;IAE/B,KAAK,CAAC,QAAQ,KAAmB,CAAC;IAElC,KAAK,CAAC,UAAU,KAAmB,CAAC;IAEpC,KAAK,CAAC,SAAS,KAAmB,CAAC;CAC1C;AAVD,sBAUC"}
|
package/dist/test-runner.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { TestSuiteConstructor } from './test-suite';
|
|
2
|
-
export type
|
|
2
|
+
export type TestMethod = (...args: unknown[]) => Promise<void>;
|
|
3
|
+
export type MethodName = string | symbol;
|
|
4
|
+
export type TestOptions = {
|
|
3
5
|
name?: string;
|
|
4
6
|
only?: boolean;
|
|
5
7
|
skip?: boolean;
|
|
8
|
+
todo?: boolean;
|
|
6
9
|
};
|
|
7
|
-
export type TestMethod = (...args: unknown[]) => Promise<void>;
|
|
8
10
|
export declare class TestRunner {
|
|
9
|
-
static run(suiteConstructor: TestSuiteConstructor, options?:
|
|
10
|
-
private static getDescribeFunction;
|
|
11
|
+
static run(suiteConstructor: TestSuiteConstructor, options?: TestOptions): void;
|
|
11
12
|
private static describe;
|
|
12
13
|
private static registerTests;
|
|
13
14
|
private static getTestMethod;
|
|
14
|
-
private static getTestRegisterMethod;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=test-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-runner.d.ts","sourceRoot":"","sources":["../src/test-runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-runner.d.ts","sourceRoot":"","sources":["../src/test-runner.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAa,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,qBAAa,UAAU;WACR,GAAG,CAChB,gBAAgB,EAAE,oBAAoB,EACtC,OAAO,GAAE,WAAgB,GACvB,IAAI;IAaP,OAAO,CAAC,MAAM,CAAC,QAAQ;IAuBvB,OAAO,CAAC,MAAM,CAAC,aAAa;IAa5B,OAAO,CAAC,MAAM,CAAC,aAAa;CAY5B"}
|
package/dist/test-runner.js
CHANGED
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TestRunner = void 0;
|
|
4
|
+
const node_test_1 = require("node:test");
|
|
4
5
|
const expection_1 = require("./expection");
|
|
5
6
|
class TestRunner {
|
|
6
7
|
static run(suiteConstructor, options = {}) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
(0, node_test_1.describe)(options.name ?? suiteConstructor.name, {
|
|
9
|
+
skip: options.skip ?? false,
|
|
10
|
+
todo: options.todo ?? false,
|
|
11
|
+
only: options.only ?? false,
|
|
12
|
+
}, this.describe.bind(this, suiteConstructor));
|
|
12
13
|
}
|
|
13
|
-
static
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
describeFunction = describe.skip;
|
|
21
|
-
}
|
|
22
|
-
return describeFunction;
|
|
23
|
-
}
|
|
24
|
-
static describe(suite) {
|
|
25
|
-
before(async () => suite.setUp());
|
|
26
|
-
after(async () => suite.tearDown());
|
|
27
|
-
beforeEach(async () => suite.beforeEach());
|
|
28
|
-
afterEach(async () => {
|
|
14
|
+
static describe(suiteConstructor, context) {
|
|
15
|
+
const suite = new suiteConstructor(context);
|
|
16
|
+
suite.testsMap = suiteConstructor.prototype.testsMap;
|
|
17
|
+
(0, node_test_1.before)(async () => suite.setUp());
|
|
18
|
+
(0, node_test_1.after)(async () => suite.tearDown());
|
|
19
|
+
(0, node_test_1.beforeEach)(async () => suite.beforeEach());
|
|
20
|
+
(0, node_test_1.afterEach)(async () => {
|
|
29
21
|
expection_1.expect.setState({
|
|
30
22
|
assertionCalls: 0,
|
|
31
23
|
expectedAssertionsNumber: null,
|
|
@@ -40,13 +32,12 @@ class TestRunner {
|
|
|
40
32
|
}
|
|
41
33
|
static registerTests(suite, options, testName) {
|
|
42
34
|
const { name = testName.toString() } = options;
|
|
43
|
-
if (options.todo) {
|
|
44
|
-
it.skip(`TODO: ${name}`);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
35
|
const method = this.getTestMethod(suite, testName);
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
(0, node_test_1.test)(name, {
|
|
37
|
+
only: options.only ?? false,
|
|
38
|
+
todo: options.todo ?? false,
|
|
39
|
+
skip: options.skip ?? false,
|
|
40
|
+
}, method);
|
|
50
41
|
}
|
|
51
42
|
static getTestMethod(suite, methodName) {
|
|
52
43
|
const testMethod = suite[methodName].bind(suite);
|
|
@@ -58,16 +49,6 @@ class TestRunner {
|
|
|
58
49
|
}
|
|
59
50
|
};
|
|
60
51
|
}
|
|
61
|
-
static getTestRegisterMethod(options) {
|
|
62
|
-
let registerMethod = it;
|
|
63
|
-
if (options.skip) {
|
|
64
|
-
registerMethod = it.skip;
|
|
65
|
-
}
|
|
66
|
-
else if (options.only) {
|
|
67
|
-
registerMethod = it.only;
|
|
68
|
-
}
|
|
69
|
-
return registerMethod;
|
|
70
|
-
}
|
|
71
52
|
}
|
|
72
53
|
exports.TestRunner = TestRunner;
|
|
73
54
|
//# sourceMappingURL=test-runner.js.map
|