From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- .../tapable/lib/__tests__/AsyncSeriesHooks.js | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 node_modules/tapable/lib/__tests__/AsyncSeriesHooks.js (limited to 'node_modules/tapable/lib/__tests__/AsyncSeriesHooks.js') diff --git a/node_modules/tapable/lib/__tests__/AsyncSeriesHooks.js b/node_modules/tapable/lib/__tests__/AsyncSeriesHooks.js new file mode 100644 index 00000000..6fa3ed72 --- /dev/null +++ b/node_modules/tapable/lib/__tests__/AsyncSeriesHooks.js @@ -0,0 +1,51 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const HookTester = require("./HookTester"); +const AsyncSeriesHook = require("../AsyncSeriesHook"); +const AsyncSeriesBailHook = require("../AsyncSeriesBailHook"); +const AsyncSeriesWaterfallHook = require("../AsyncSeriesWaterfallHook"); +const AsyncSeriesLoopHook = require("../AsyncSeriesLoopHook"); + +describe("AsyncSeriesHook", () => { + it("should have to correct behavior", async () => { + const tester = new HookTester(args => new AsyncSeriesHook(args)); + + const result = await tester.run(); + + expect(result).toMatchSnapshot(); + }); +}); + +describe("AsyncSeriesBailHook", () => { + it("should have to correct behavior", async () => { + const tester = new HookTester(args => new AsyncSeriesBailHook(args)); + + const result = await tester.run(); + + expect(result).toMatchSnapshot(); + }); +}); + +describe("AsyncSeriesWaterfallHook", () => { + it("should have to correct behavior", async () => { + const tester = new HookTester(args => new AsyncSeriesWaterfallHook(args)); + + const result = await tester.run(); + + expect(result).toMatchSnapshot(); + }); +}); + +describe("AsyncSeriesLoopHook", () => { + it("should have to correct behavior", async () => { + const tester = new HookTester(args => new AsyncSeriesLoopHook(args)); + + const result = await tester.runForLoop(); + + expect(result).toMatchSnapshot(); + }); +}); -- cgit v1.2.3