contexttesting / zoroaster

A modern JavaScript testing framework for Node.js with support for test contexts and masks.
https://www.contexttesting.com
MIT License
5 stars 0 forks source link

raise errors when masks override other masks during ... in maketestsuite #57

Closed zavr-1 closed 5 years ago

zavr-1 commented 5 years ago
// this will have a result file components.html that produces components test suite
const ts = makeTestSuite('test/result/Documentary', {
  getTransform() {
    const doc = new Documentary()
    return doc
  },
})

// this also produces a test suite components 
export const components = makeTestSuite('test/result/Documentary-components.md', {
  context: TempContext,
  /**
   * @param {TempContext} t
   */
  async getTransform({ TEMP, add }) {
    await add('test/fixture/.documentary')
    const doc = new Documentary({ cwd: TEMP })
    return doc
  },
})
zavr-1 commented 5 years ago

It's not possible because it's done on the ÀLaMode-level, i.e., makeTestSuite will create an object where default is folded, and when another variable is exported, it overrides the one in the original object.