EM uses extensionForTesting as an extension in integration tests. This extension is written in typescript. The extension is a template with placeholders. Each test does the following steps:
It fills the placeholders
Writes the extension TS file to a temp folder
Runs npm run build which
Runs TypeScript compiler tsc
Bundles the JS to a single file using esbuild
We can speedup this process by converting the extension file to pure JavaScript, thus saving the tsc step.
Disadvantage of this change: The extensionForTesting is not type-checked against the extension-manager-interface.
Test results
Test 1: time go test ./... -p 1 -count 1 -v with DB already running
Test 2: Just run controller_test.go from IDE. This test uses extensionForTesting very often
EM uses
extensionForTesting
as an extension in integration tests. This extension is written in typescript. The extension is a template with placeholders. Each test does the following steps:npm run build
whichtsc
esbuild
We can speedup this process by converting the extension file to pure JavaScript, thus saving the
tsc
step.Disadvantage of this change: The
extensionForTesting
is not type-checked against theextension-manager-interface
.Test results
time go test ./... -p 1 -count 1 -v
with DB already runningcontroller_test.go
from IDE. This test uses extensionForTesting very oftenOriginal TypeScript
Pure JavaScript