Commit Graph

19 Commits

Author SHA1 Message Date
Damien Elmes
f2029b8ba8 support jsdom tests
Alternative would be to switch to jsdom for everything, but TextEncoder
is currently missing from jsdom, and jsdom mode is slower IIRC.
2021-06-19 09:43:09 +10:00
Henrik Giesel
297150a1b6 Cannot create Jest jsdom tests (?) 2021-06-18 20:41:54 +02:00
Damien Elmes
0026506543 update ts deps
- prettier's formatting has changed, so files needed to be reformatted
- dart is spitting out deprecation warnings like:

254 │   2: $spacer / 2,
    │      ^^^^^^^^^^^
    ╵
    bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6  @import
    ts/sass/button_mixins.scss 2:9                                          @use
    ts/components/ColorPicker.svelte 2:5                                    root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter-width, 2)
2021-05-26 09:37:40 +10:00
Damien Elmes
70c3b51b0b remove nested terneries and enable lint
@hgiesel would you mind quickly checking I've correctly captured
the logic here?
2021-04-23 13:00:18 +10:00
Henrik Giesel
a7c3aec5dc Update Typescript to 4.2.4 2021-04-22 18:33:42 +02:00
Henrik Giesel
b1de095162 Include editor-toolbar as a library in editor 2021-04-20 13:44:44 +02:00
Damien Elmes
d158450e89 add macro for invoking Jest 2021-04-16 23:46:31 +10:00
Damien Elmes
e520e8df02 add missing copyright headers to *.ts 2021-04-13 18:57:08 +10:00
Damien Elmes
26ac64526c disable Jest tests on Windows again
It looks like the templated_args change only masked the error last time;
Jest seems broken on Windows with both the patched .24 version, latest
stable, and the new beta version too, presumably because symlinks are
being handled differently on Windows somehow. It might be possible to
hack around the issue by patching the following file, but I'm not sure:

https://github.com/facebook/jest/blob/master/packages/jest-haste-map/src/crawlers/node.ts
2021-04-12 15:39:46 +10:00
Damien Elmes
94330fc0eb fix jest
- templated_args was missing --node_modules= prefix, and was causing
tests to pass unconditionally
- update to beta of jest 27, which introduces an option to fix the
symlink handling, and is approx twice as fast to start up
2021-04-12 09:43:31 +10:00
Damien Elmes
493557aee7 fix Jest on Windows 2021-03-28 20:59:51 +10:00
Damien Elmes
f46f4cbf17 Revert "disable Jest tests on Windows for now"
This reverts commit 36022844bb.
2021-03-28 20:59:31 +10:00
Damien Elmes
36022844bb disable Jest tests on Windows for now 2021-03-28 20:34:10 +10:00
Damien Elmes
c891f45ed9 add Jest for TS unit tests
@hgiesel the reason no files were being found is because Jest ignores
symlinks by default. The Bazel example includes a patch we can use
to work around it, and Jest plan to add symlink support in a future
update.

https://github.com/bazelbuild/rules_nodejs/blob/stable/examples/jest/patches/jest-haste-map%2B24.9.0.patch

https://github.com/facebook/jest/pull/9351
2021-03-28 19:41:20 +10:00
Henrik Giesel
05ea624f85 Utilize ts/tsconfig.js from ts/{editor,html-filter} 2021-03-28 19:41:20 +10:00
Henrik Giesel
35beebcfa6 Satisfy formatter 2021-03-28 19:41:20 +10:00
Henrik Giesel
861c723ec0 Avoid using outerHTML + Fix regression 2021-03-28 19:41:20 +10:00
Henrik Giesel
f9259621a6 Change filter logic in html-filter/element: predicate true, means it stays in 2021-03-28 19:41:20 +10:00
Henrik Giesel
519aea2ea8 Move html-filter into its own directory 2021-03-28 19:41:20 +10:00