diff --git a/__tests__/index.ts b/__tests__/index.ts index 75b604e..651a2e7 100644 --- a/__tests__/index.ts +++ b/__tests__/index.ts @@ -1,5 +1,10 @@ -describe(':for typescript', function () { - it('', async () => { - +import Index, {type} from '../src/index'; +import * as assert from 'assert'; + +describe('', () => { + it('', () => { + assert.strictEqual(new Index().constructor.name, 'Index'); + assert.strictEqual(type, 'typescript'); }); + }); \ No newline at end of file diff --git a/package.json b/package.json index f2451be..9ab89cd 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,19 @@ { "scripts": { "compile": "tsc --project tsconfig.json", - "test": "jest" + "test": "jest", + "mocha-test": "ts-mocha test/*" }, "main": "dist/index.js", "types": "dist/index.d.ts", "devDependencies": { + "@types/jest": "latest", "@typescript-eslint/eslint-plugin": "latest", "@typescript-eslint/parser": "latest", "eslint": "latest", "jest": "latest", "ts-jest": "latest", - "@types/jest": "latest", + "ts-mocha": "latest", "typescript": "latest" } } diff --git a/src/index.ts b/src/index.ts index e69de29..8d0921f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -0,0 +1,5 @@ +export default class Index { + constructor() { + } +} +export const type = 'typescript'; \ No newline at end of file diff --git a/test.tsconfig.json b/test.tsconfig.json index e695a18..491fec6 100644 --- a/test.tsconfig.json +++ b/test.tsconfig.json @@ -1,5 +1,6 @@ { "include": [ - "__tests__/" + "__tests__/", + "test" ] } diff --git a/test/mocha.ts b/test/mocha.ts new file mode 100644 index 0000000..8eb213e --- /dev/null +++ b/test/mocha.ts @@ -0,0 +1,10 @@ +import * as assert from 'assert'; +import Index, {type} from '../src'; + +describe('', () => { + it('', () => { + assert.strictEqual(new Index().constructor.name, 'Index'); + assert.strictEqual(type, 'typescript'); + }); + +}); \ No newline at end of file