@noma.to/qwik-testing-library 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/lib/mock.qwik.cjs +3 -3
- package/lib/lib/mock.qwik.mjs +1 -1
- package/lib/lib/qwik-testing-library.qwik.cjs +2 -2
- package/lib/lib/qwik-testing-library.qwik.mjs +3 -3
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.cjs +89 -0
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.mjs +89 -0
- package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.cjs +321 -97
- package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.mjs +318 -94
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +312 -15
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +317 -20
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.cjs +161 -69
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.mjs +158 -66
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.cjs +976 -538
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.mjs +976 -538
- package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.cjs +20 -3
- package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.mjs +20 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs} +7 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs} +7 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.cjs +491 -467
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.mjs +491 -467
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.cjs +6 -6
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.mjs +3 -3
- package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.cjs +474 -0
- package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.mjs +474 -0
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/source-map.qwik.cjs +20 -20
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/source-map.qwik.mjs +20 -20
- package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.cjs +71 -39
- package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.mjs +71 -39
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/error.qwik.cjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/error.qwik.mjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.mjs +6 -6
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.cjs +1 -3
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.mjs +1 -3
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.cjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.mjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/string.qwik.cjs +1 -2
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/string.qwik.mjs +1 -2
- package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.cjs +44 -33
- package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.mjs +44 -33
- package/lib/node_modules/.pnpm/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.cjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.cjs} +2 -2
- package/lib/node_modules/.pnpm/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.mjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.mjs} +2 -2
- package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +4 -0
- package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +5 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +66 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +66 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.cjs +2977 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.mjs +2977 -0
- package/package.json +13 -13
- package/lib/_virtual/_commonjsHelpers.qwik.cjs +0 -4
- package/lib/_virtual/_commonjsHelpers.qwik.mjs +0 -4
- package/lib/_virtual/sourcemap-codec.umd.qwik.cjs +0 -4
- package/lib/_virtual/sourcemap-codec.umd.qwik.mjs +0 -4
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.cjs +0 -425
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.mjs +0 -425
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.cjs +0 -81
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.mjs +0 -81
- package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +0 -7
- package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +0 -8
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.cjs +0 -6
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.mjs +0 -6
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.cjs +0 -16
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.mjs +0 -16
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.cjs +0 -2556
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.mjs +0 -2556
- /package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ src="https://raw.githubusercontent.com/ianlet/qwik-testing-library/main/high-vol
|
|
|
19
19
|
[![MIT License][license-badge]][license]
|
|
20
20
|
|
|
21
21
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
22
|
-
[](#contributors-)
|
|
23
23
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
24
24
|
[![PRs Welcome][prs-badge]][prs]
|
|
25
25
|
[![Code of Conduct][coc-badge]][coc]
|
|
@@ -163,7 +163,7 @@ runner.
|
|
|
163
163
|
If you haven't done so already, add vitest to your project using Qwik CLI:
|
|
164
164
|
|
|
165
165
|
```shell
|
|
166
|
-
npm qwik add vitest
|
|
166
|
+
npm run qwik add vitest
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
After that, we need to configure Vitest so it can run your tests.
|
|
@@ -471,6 +471,7 @@ Thanks goes to these people ([emoji key][emojis]):
|
|
|
471
471
|
<tbody>
|
|
472
472
|
<tr>
|
|
473
473
|
<td align="center" valign="top" width="14.28%"><a href="https://noma.to/"><img src="https://avatars.githubusercontent.com/u/6018732?v=4?s=100" width="100px;" alt="Ian Létourneau"/><br /><sub><b>Ian Létourneau</b></sub></a><br /><a href="https://github.com/ianlet/qwik-testing-library/commits?author=ianlet" title="Code">💻</a> <a href="https://github.com/ianlet/qwik-testing-library/commits?author=ianlet" title="Tests">⚠️</a> <a href="#ideas-ianlet" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ianlet/qwik-testing-library/commits?author=ianlet" title="Documentation">📖</a> <a href="#example-ianlet" title="Examples">💡</a></td>
|
|
474
|
+
<td align="center" valign="top" width="14.28%"><a href="https://brandonpittman.com"><img src="https://avatars.githubusercontent.com/u/967145?v=4?s=100" width="100px;" alt="Brandon Pittman"/><br /><sub><b>Brandon Pittman</b></sub></a><br /><a href="https://github.com/ianlet/qwik-testing-library/commits?author=brandonpittman" title="Documentation">📖</a></td>
|
|
474
475
|
</tr>
|
|
475
476
|
</tbody>
|
|
476
477
|
<tfoot>
|
|
@@ -508,4 +509,4 @@ qwikly.
|
|
|
508
509
|
|
|
509
510
|
[qwik-baseline]: https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing
|
|
510
511
|
|
|
511
|
-
[tl-team]: https://testing-library.com
|
|
512
|
+
[tl-team]: https://testing-library.com
|
package/lib/lib/mock.qwik.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const qwik = require("@builder.io/qwik");
|
|
4
|
-
const
|
|
4
|
+
const vi_CjhMlMwf = require("../node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.cjs");
|
|
5
5
|
const mockQrl = () => {
|
|
6
|
-
return qwik.$(
|
|
6
|
+
return qwik.$(vi_CjhMlMwf.v.fn());
|
|
7
7
|
};
|
|
8
8
|
const mock$ = qwik.implicit$FirstArg(mockQrl);
|
|
9
9
|
function clearAllMocks() {
|
|
10
|
-
|
|
10
|
+
vi_CjhMlMwf.v.clearAllMocks();
|
|
11
11
|
}
|
|
12
12
|
exports.clearAllMocks = clearAllMocks;
|
|
13
13
|
exports.mock$ = mock$;
|
package/lib/lib/mock.qwik.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { implicit$FirstArg, $ } from "@builder.io/qwik";
|
|
2
|
-
import { v as vi } from "../node_modules/.pnpm/vitest@
|
|
2
|
+
import { v as vi } from "../node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.mjs";
|
|
3
3
|
const mockQrl = () => {
|
|
4
4
|
return $(vi.fn());
|
|
5
5
|
};
|
|
@@ -24,8 +24,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
25
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
26
26
|
const dom = require("@testing-library/dom");
|
|
27
|
-
const qwikloader = require("./qwikloader.qwik.cjs");
|
|
28
27
|
const mock = require("./mock.qwik.cjs");
|
|
28
|
+
const qwikloader = require("./qwikloader.qwik.cjs");
|
|
29
29
|
if (typeof process === "undefined" || !process.env?.QTL_SKIP_AUTO_CLEANUP) {
|
|
30
30
|
if (typeof afterEach === "function") {
|
|
31
31
|
afterEach(() => {
|
|
@@ -47,6 +47,7 @@ async function render(ui, options = {}) {
|
|
|
47
47
|
const wrappedUi = !Wrapper ? ui : /* @__PURE__ */ jsxRuntime.jsx(Wrapper, {
|
|
48
48
|
children: ui
|
|
49
49
|
});
|
|
50
|
+
qwikloader.qwikLoader(baseElement.ownerDocument);
|
|
50
51
|
const { cleanup: cleanup2 } = await qwik.render(container, wrappedUi, {
|
|
51
52
|
serverData
|
|
52
53
|
});
|
|
@@ -54,7 +55,6 @@ async function render(ui, options = {}) {
|
|
|
54
55
|
container,
|
|
55
56
|
componentCleanup: cleanup2
|
|
56
57
|
});
|
|
57
|
-
qwikloader.qwikLoader(baseElement.ownerDocument);
|
|
58
58
|
return {
|
|
59
59
|
container,
|
|
60
60
|
baseElement,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getQueriesForElement, prettyDOM } from "@testing-library/dom";
|
|
3
3
|
export * from "@testing-library/dom";
|
|
4
|
-
import { qwikLoader } from "./qwikloader.qwik.mjs";
|
|
5
4
|
import { clearAllMocks, mock$, mockQrl } from "./mock.qwik.mjs";
|
|
5
|
+
import { qwikLoader } from "./qwikloader.qwik.mjs";
|
|
6
6
|
if (typeof process === "undefined" || !process.env?.QTL_SKIP_AUTO_CLEANUP) {
|
|
7
7
|
if (typeof afterEach === "function") {
|
|
8
8
|
afterEach(() => {
|
|
@@ -24,6 +24,7 @@ async function render(ui, options = {}) {
|
|
|
24
24
|
const wrappedUi = !Wrapper ? ui : /* @__PURE__ */ jsx(Wrapper, {
|
|
25
25
|
children: ui
|
|
26
26
|
});
|
|
27
|
+
qwikLoader(baseElement.ownerDocument);
|
|
27
28
|
const { cleanup: cleanup2 } = await qwik.render(container, wrappedUi, {
|
|
28
29
|
serverData
|
|
29
30
|
});
|
|
@@ -31,7 +32,6 @@ async function render(ui, options = {}) {
|
|
|
31
32
|
container,
|
|
32
33
|
componentCleanup: cleanup2
|
|
33
34
|
});
|
|
34
|
-
qwikLoader(baseElement.ownerDocument);
|
|
35
35
|
return {
|
|
36
36
|
container,
|
|
37
37
|
baseElement,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const comma = ",".charCodeAt(0);
|
|
4
|
+
const semicolon = ";".charCodeAt(0);
|
|
5
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6
|
+
const intToChar = new Uint8Array(64);
|
|
7
|
+
const charToInt = new Uint8Array(128);
|
|
8
|
+
for (let i = 0; i < chars.length; i++) {
|
|
9
|
+
const c = chars.charCodeAt(i);
|
|
10
|
+
intToChar[i] = c;
|
|
11
|
+
charToInt[c] = i;
|
|
12
|
+
}
|
|
13
|
+
function encodeInteger(builder, num, relative) {
|
|
14
|
+
let delta = num - relative;
|
|
15
|
+
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
16
|
+
do {
|
|
17
|
+
let clamped = delta & 31;
|
|
18
|
+
delta >>>= 5;
|
|
19
|
+
if (delta > 0)
|
|
20
|
+
clamped |= 32;
|
|
21
|
+
builder.write(intToChar[clamped]);
|
|
22
|
+
} while (delta > 0);
|
|
23
|
+
return num;
|
|
24
|
+
}
|
|
25
|
+
const bufLength = 1024 * 16;
|
|
26
|
+
const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
27
|
+
decode(buf) {
|
|
28
|
+
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
29
|
+
return out.toString();
|
|
30
|
+
}
|
|
31
|
+
} : {
|
|
32
|
+
decode(buf) {
|
|
33
|
+
let out = "";
|
|
34
|
+
for (let i = 0; i < buf.length; i++) {
|
|
35
|
+
out += String.fromCharCode(buf[i]);
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
class StringWriter {
|
|
41
|
+
constructor() {
|
|
42
|
+
this.pos = 0;
|
|
43
|
+
this.out = "";
|
|
44
|
+
this.buffer = new Uint8Array(bufLength);
|
|
45
|
+
}
|
|
46
|
+
write(v) {
|
|
47
|
+
const { buffer } = this;
|
|
48
|
+
buffer[this.pos++] = v;
|
|
49
|
+
if (this.pos === bufLength) {
|
|
50
|
+
this.out += td.decode(buffer);
|
|
51
|
+
this.pos = 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
flush() {
|
|
55
|
+
const { buffer, out, pos } = this;
|
|
56
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function encode(decoded) {
|
|
60
|
+
const writer = new StringWriter();
|
|
61
|
+
let sourcesIndex = 0;
|
|
62
|
+
let sourceLine = 0;
|
|
63
|
+
let sourceColumn = 0;
|
|
64
|
+
let namesIndex = 0;
|
|
65
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
66
|
+
const line = decoded[i];
|
|
67
|
+
if (i > 0)
|
|
68
|
+
writer.write(semicolon);
|
|
69
|
+
if (line.length === 0)
|
|
70
|
+
continue;
|
|
71
|
+
let genColumn = 0;
|
|
72
|
+
for (let j = 0; j < line.length; j++) {
|
|
73
|
+
const segment = line[j];
|
|
74
|
+
if (j > 0)
|
|
75
|
+
writer.write(comma);
|
|
76
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
77
|
+
if (segment.length === 1)
|
|
78
|
+
continue;
|
|
79
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
80
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
81
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
82
|
+
if (segment.length === 4)
|
|
83
|
+
continue;
|
|
84
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return writer.flush();
|
|
88
|
+
}
|
|
89
|
+
exports.encode = encode;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const comma = ",".charCodeAt(0);
|
|
2
|
+
const semicolon = ";".charCodeAt(0);
|
|
3
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4
|
+
const intToChar = new Uint8Array(64);
|
|
5
|
+
const charToInt = new Uint8Array(128);
|
|
6
|
+
for (let i = 0; i < chars.length; i++) {
|
|
7
|
+
const c = chars.charCodeAt(i);
|
|
8
|
+
intToChar[i] = c;
|
|
9
|
+
charToInt[c] = i;
|
|
10
|
+
}
|
|
11
|
+
function encodeInteger(builder, num, relative) {
|
|
12
|
+
let delta = num - relative;
|
|
13
|
+
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
14
|
+
do {
|
|
15
|
+
let clamped = delta & 31;
|
|
16
|
+
delta >>>= 5;
|
|
17
|
+
if (delta > 0)
|
|
18
|
+
clamped |= 32;
|
|
19
|
+
builder.write(intToChar[clamped]);
|
|
20
|
+
} while (delta > 0);
|
|
21
|
+
return num;
|
|
22
|
+
}
|
|
23
|
+
const bufLength = 1024 * 16;
|
|
24
|
+
const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
25
|
+
decode(buf) {
|
|
26
|
+
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
27
|
+
return out.toString();
|
|
28
|
+
}
|
|
29
|
+
} : {
|
|
30
|
+
decode(buf) {
|
|
31
|
+
let out = "";
|
|
32
|
+
for (let i = 0; i < buf.length; i++) {
|
|
33
|
+
out += String.fromCharCode(buf[i]);
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
class StringWriter {
|
|
39
|
+
constructor() {
|
|
40
|
+
this.pos = 0;
|
|
41
|
+
this.out = "";
|
|
42
|
+
this.buffer = new Uint8Array(bufLength);
|
|
43
|
+
}
|
|
44
|
+
write(v) {
|
|
45
|
+
const { buffer } = this;
|
|
46
|
+
buffer[this.pos++] = v;
|
|
47
|
+
if (this.pos === bufLength) {
|
|
48
|
+
this.out += td.decode(buffer);
|
|
49
|
+
this.pos = 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
flush() {
|
|
53
|
+
const { buffer, out, pos } = this;
|
|
54
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function encode(decoded) {
|
|
58
|
+
const writer = new StringWriter();
|
|
59
|
+
let sourcesIndex = 0;
|
|
60
|
+
let sourceLine = 0;
|
|
61
|
+
let sourceColumn = 0;
|
|
62
|
+
let namesIndex = 0;
|
|
63
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
64
|
+
const line = decoded[i];
|
|
65
|
+
if (i > 0)
|
|
66
|
+
writer.write(semicolon);
|
|
67
|
+
if (line.length === 0)
|
|
68
|
+
continue;
|
|
69
|
+
let genColumn = 0;
|
|
70
|
+
for (let j = 0; j < line.length; j++) {
|
|
71
|
+
const segment = line[j];
|
|
72
|
+
if (j > 0)
|
|
73
|
+
writer.write(comma);
|
|
74
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
75
|
+
if (segment.length === 1)
|
|
76
|
+
continue;
|
|
77
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
78
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
79
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
80
|
+
if (segment.length === 4)
|
|
81
|
+
continue;
|
|
82
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return writer.flush();
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
encode
|
|
89
|
+
};
|