Skip to content

Make tests work without input/output files #97

@phillipskevin

Description

@phillipskevin

It would be really nice if we could just use template literals for tests, instead of requiring new files for every test and updates to the transforms file:

{
"input": "can-component-rename/input.js",
"outputPath": "can-component-rename/can-component-rename-input.js",
"type": "fixture",
"version": "3"
},
{
"input": "can-component-rename/output.js",
"outputPath": "can-component-rename/can-component-rename-output.js",
"type": "fixture",
"version": "3"
},

It would be nice if you could just do something like

runTests("can-stache/console-log", [{
  in: `
    {{log}}
  `,
  out: `
    {{console.log(this)}}
  `
}, {
  in: `
    {{log(foo)}}
  `,
  out: `
    {{console.log(foo)}}
  `
}];

This would make it much easier to add new tests and would make it more likely for people to add new tests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions