Skip to content

Remove duplication from HTML parser tests #149

@bebraw

Description

@bebraw

Example:

// --------------- testsuite.js
import * as sharedTest_A from "./sharedtest_A.js";

Deno.test({
  name: "testFoo",
  fn: async (t) => {
    await t.step("sharedTest_A", async (t) => {
      await sharedTest_A.testFoo(t);
      await sharedTest_A.testBar(t);
    });
    // await t.step("sharedtest_B" async (t) => { ... });
  }
})

// --------------- sharedtest_A.js
export async function testFoo(t) {
  await t.step("test 1", async (t) => {
    // do something
  });
  await t.step("test 2", async (t) => {
    // do something
  });
}
export async function testBar(t) {
  await t.step("test 3", async (t) => {
    // do something
  });
  await t.step("test 4", async (t) => {
    // do something
  });

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions