AsyncParallelHooks.js 828 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const HookTester = require("./HookTester");
  7. const AsyncParallelHook = require("../AsyncParallelHook");
  8. const AsyncParallelBailHook = require("../AsyncParallelBailHook");
  9. describe("AsyncParallelHook", () => {
  10. it("should have to correct behavior", async () => {
  11. const tester = new HookTester((args) => new AsyncParallelHook(args));
  12. const result = await tester.run();
  13. expect(result).toMatchSnapshot();
  14. }, 15000)
  15. })
  16. describe("AsyncParallelBailHook", () => {
  17. it("should have to correct behavior", async () => {
  18. const tester = new HookTester((args) => new AsyncParallelBailHook(args));
  19. const result = await tester.run();
  20. expect(result).toMatchSnapshot();
  21. }, 15000)
  22. })