From 5545b5b409dddc41ecd552c88d6f901f30646ecf Mon Sep 17 00:00:00 2001 From: Mathias Lykkegaard Lorenzen Date: Sat, 7 Dec 2019 11:42:16 +0100 Subject: [PATCH] Revert "Add tests for didNotReceive #72 (#73)" (#74) This reverts commit e01c7935e5b8a82509264021fcec99048736d3cf. --- spec/issues/72.test.ts | 51 ------------------------------------------ 1 file changed, 51 deletions(-) delete mode 100644 spec/issues/72.test.ts diff --git a/spec/issues/72.test.ts b/spec/issues/72.test.ts deleted file mode 100644 index 1aa4646..0000000 --- a/spec/issues/72.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import test from "ava"; - -import { Substitute, Arg } from "../../src/index"; - -interface Calculator { - add(a: number, b: number): number; - subtract(a: number, b: number): number; - divide(a: number, b: number): number; - - isEnabled: boolean; -} - -test("check didNotReceive after not mocking and not calling a method", () => { - const calculator = Substitute.for(); - - // Do not mock and do not call - calculator.didNotReceive().add(1, 2); - calculator.didNotReceive().add(Arg.any(), Arg.any()); - calculator.didNotReceive().add(1, Arg.any()); -}); - -test("check didNotReceive after not mocking but calling a method", () => { - const calculator = Substitute.for(); - - // Do not mock, but call - calculator.add(1, 2); - calculator.didNotReceive().add(1, 2); - calculator.didNotReceive().add(Arg.any(), Arg.any()); - calculator.didNotReceive().add(1, Arg.any()); -}); - -test("check didNotReceive after mocking but not calling a method", () => { - const calculator = Substitute.for(); - - // Mock but do not call - calculator.add(1, 2).returns(3); - calculator.didNotReceive().add(1, 2); - calculator.didNotReceive().add(Arg.any(), Arg.any()); - calculator.didNotReceive().add(1, Arg.any()); -}); - -test("check didNotReceive after mocking and calling a method", () => { - const calculator = Substitute.for(); - - // Mock and call - calculator.add(1, 2).returns(3); - calculator.add(1, 2); - calculator.didNotReceive().add(1, 2); - calculator.didNotReceive().add(Arg.any(), Arg.any()); - calculator.didNotReceive().add(1, Arg.any()); -});