Abdellah Alaoui Solaimani d1919a069c
fix: use correct source maps in stacktrace (#2027)
* [vitest] use correct source maps in stacktrace

use vitenode server to get a fetch result instead of a transform result.
And then get the sourcemap from it.

* [vitest] refactor

* add tests for stack traces and sourcemaps

* commit lockfile

* fix linter

* fix types linter

* remove dynamic content from snapshot

* push the correct snapshot

* fix tests :)

* increase timeout for runner tests

* decrease timeout .. not the culprit in CI

* move continue below map assignment

* guard against accessing vitenode server

* reduce the size of snapshots

* rename timeout to prevent running more than one
2022-10-07 10:13:39 +02:00

16 lines
260 B
TypeScript

/* body */
import { expect, it } from 'vitest'
import { add } from './utils'
interface Num {
count: number
}
const a: Num = { count: 10 }
it('add', () => {
expect(add(a.count)).toBe(100)
expect(add(1)).toBe(1)
return expect(add(1, 2, 3)).toBe(6)
})