diff --git a/index.ts b/index.ts deleted file mode 100644 index e7da01c..0000000 --- a/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ManageListener } from "./src/manage-listener"; diff --git a/package.json b/package.json index d409633..fc51edc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "gestion-listener", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "build/index.js", + "types": "build/index.d.ts", "scripts": { "test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' mocha --require ts-node/register ./tests/**/*-spec.ts", "build": "tsc -p ./src" @@ -33,7 +34,7 @@ "typescript": "^4.1.3" }, "dependencies": { - "listener-rss": "file:../listener-rss" + "listener-rss": "file:../listener-rss", "sqlite3": "^5.0.2" } } diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..1b3697c --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export { ManageListener } from "./manage-listener"; diff --git a/tests/index-spec.ts b/tests/index-spec.ts index b69dd67..9a76775 100644 --- a/tests/index-spec.ts +++ b/tests/index-spec.ts @@ -53,7 +53,7 @@ describe("test class GestionListener", function () { fs.unlinkSync("tests/RessourcesTest/FakeRessources/fake_save.json"); }); - it.only("should save the inserted objects", function (): void { + it("should save the inserted objects", function (): void { // given const ml = new ManageListener(); let expectedObj: ListenerRss[] = []; @@ -292,7 +292,7 @@ describe("test class GestionListener", function () { path: "tests/RessourcesTest/RealRessources/save_no_history.json", }); - const updateSpy = sinon.spy(); + const updateSpy = sinon.spy((obj) => console.log(obj)); const newEntriesSpy = sinon.spy(); const tabChannelId = [