Skip to content

Commit 4be9fab

Browse files
Add label to TestsSymbol
2 parents 910caa7 + d7784ba commit 4be9fab

7 files changed

Lines changed: 41 additions & 4 deletions

File tree

library/component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,9 @@ export const useTemplate = <
792792
configurable: true,
793793
enumerable: true,
794794
value(this: E) {
795-
return maybeCall(() => _connectedCallback && _connectedCallback.call(this))
795+
return maybeCall(() =>
796+
_connectedCallback && _connectedCallback.call(this)
797+
)
796798
.then(() => maybeCall<HTMLTemplateElement>(f))
797799
.then((template) => {
798800
if (!template) return;

library/testing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { maybeCall, noop, randomUUID } from "./utilities.ts";
22
import { CustomElement, CustomElementConstructor, State } from "./component.ts";
33

4-
export const TestsSymbol = Symbol();
4+
export const TestsSymbol = Symbol.for("fc-tests");
55

66
export const constructComponent = <
77
S extends State,

scripts/build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
deno run --allow-all --config "$r/tsconfig.json" "$r/scripts/build.ts" "$@"

scripts/build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ await build({
2626
},
2727
},
2828
shims: {
29-
// see JS docs for overview and more options
30-
deno: true,
29+
deno: false,
3130
},
3231
test: false,
3332
});

scripts/format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno fmt --config "$r/tsconfig.json" "$r/library/"
8+
else
9+
deno fmt --config "$r/tsconfig.json" "$@"
10+
fi

scripts/lint

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno lint --config "$r/tsconfig.json" "$r/library/"
8+
else
9+
deno lint --config "$r/tsconfig.json" "$@"
10+
fi

scripts/test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno test --config "$r/tsconfig.json" --allow-all --no-check --unstable "$r/library/"
8+
else
9+
deno test --config "$r/tsconfig.json" --watch --allow-all --unstable "$@"
10+
fi

0 commit comments

Comments
 (0)