theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

Add core functionality to default `intern` export #1120

Open jason0x43 opened 4 years ago

jason0x43 commented 4 years ago

Core functionality, such as the built in test interfaces and assertions, should be available to import through the base Intern export.

import { describe, it } from 'intern';
describe('something', () => { ... });

At least the test interfaces (object, bdd, tdd), assert, and expect should be exported. The implementer should also verify that the necessary types are exported so that the package is usable when installed.

See #1041 for discussion

jason0x43 commented 4 years ago

Another reason for this -- when directly importing interfaces, you'll end up building parts of intern into tests. That can lead to subtle issues.