File tree 8 files changed +7007
-1076
lines changed
8 files changed +7007
-1076
lines changed Original file line number Diff line number Diff line change 1
1
root : true
2
2
extends : google
3
3
parserOptions :
4
- ecmaVersion : 6
4
+ ecmaVersion : 2018
5
5
rules :
6
6
require-jsdoc : ' off'
7
7
indent : ' off'
Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ Reference .ts files in html templates as module code.
53
53
54
54
` <script type="module" src="/ts/filename.ts"> `
55
55
56
+ Write unit tests for TypeScript code using the [ jest] ( https://jestjs.io/ )
57
+ testing framework.
58
+
59
+ ### Run Jest
60
+
61
+ ./npx jest [TestPathPattern]
62
+
56
63
## Deploying
57
64
58
65
Each time a CL is reviewed and submitted, the code is deployed to App Engine.
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @license
3
+ * Copyright 2022 The Go Authors. All rights reserved.
4
+ * Use of this source code is governed by a BSD-style
5
+ * license that can be found in the LICENSE file.
6
+ */
7
+
8
+ const { transform} = require ( 'esbuild' ) ;
9
+
10
+ exports . createTransformer = ( ) => ( {
11
+ canInstrument : true ,
12
+ processAsync : async ( source ) => {
13
+ const result = await transform ( source , {
14
+ loader : 'ts' ,
15
+ } ) ;
16
+ if ( result . warnings . length ) {
17
+ result . warnings . forEach ( m => {
18
+ console . warn ( m ) ;
19
+ } ) ;
20
+ }
21
+ return {
22
+ code : result . code ,
23
+ map : result . map ,
24
+ } ;
25
+ } ,
26
+ } ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ docker run \
7
7
--rm \
8
8
--volume $( pwd) :/workspace \
9
9
--workdir /workspace \
10
+ --env NODE_OPTIONS=" --experimental-vm-modules --no-warnings" \
10
11
--entrypoint npm \
11
12
node:16.13.1-alpine3.14 \
12
13
$@
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ docker run \
7
7
--rm \
8
8
--volume $( pwd) :/workspace \
9
9
--workdir /workspace \
10
+ --env NODE_OPTIONS=" --experimental-vm-modules --no-warnings" \
10
11
--entrypoint npx \
11
12
node:16.13.1-alpine3.14 \
12
13
$@
You can’t perform that action at this time.
0 commit comments