phryneas / remark-typescript-tools

MIT License
129 stars 7 forks source link

Add support for hyphens in virtual filenames #6

Closed Shrugsy closed 3 years ago

Shrugsy commented 3 years ago

As per title: adds support for hyphens in virtual filenames

e.g.

// file: foo-bar.ts noEmit
export const foo = 'foo'

// file: main.ts
import { foo } from './foo-bar'

console.log(foo)

Also adds returns to the relevant expect statements in tests that expected a promise to eventually resolve/throw (otherwise they resolve/throw outside of the tests, and the tests can report false positives)

phryneas commented 3 years ago

Looks good, but could you make the return an await and the test functions async please? Gonna be super awkward otherwise if at some point we forget about this and want multiple expect calls in one test.

Shrugsy commented 3 years ago

Looks good, but could you make the return an await and the test functions async please? Gonna be super awkward otherwise if at some point we forget about this and want multiple expect calls in one test.

Yup, all done. I hadn't actually realised awaiting the expect().rejects was possible at the time or I would have done that in the first place