tunnckoCore / asia

:eight_spoked_asterisk: Blazingly fast, magical and minimalist testing framework for Today :date: and Tomorrow :crystal_ball: Try `npm i -D asia@next` for pre-v1
Apache License 2.0
1 stars 0 forks source link

v2 Notes, & separation #75

Open tunnckoCore opened 2 years ago

tunnckoCore commented 2 years ago

Because it's easier to navigate.

tunnckoCore commented 2 years ago

already published

tunnckoCore commented 2 years ago

Filter by test file's path or test's title: just pass a filter to the config.

export default () => {
  return {
    filter: (cfg, { title, testPath, callsites }) => {
      const match = cfg.env.ASIA_MATCH || "";
      const byPath = match
        ? testPath.includes(match) || new RegExp(match).test(testPath)
        : false;

      const byTitle =
        byPath === false && match
          ? title.includes(match) || new RegExp(match).test(title)
          : false;

      return byPath || byTitle;
    },
  }
}
tunnckoCore commented 2 years ago

ASIA_MATCH='some matcher' and ASIA_NO_CACHE=1 doesn't work well. Kind of impossible for now.