From: Matt Corallo Date: Mon, 10 Jan 2022 05:41:44 +0000 (+0000) Subject: [TS] Change paths to liblightningjs.wasm to be in ts/ X-Git-Tag: v0.0.104.1^2~5 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=aa53e31ced2be6d66fb5ade604431ea82ebefb6f;p=ldk-java [TS] Change paths to liblightningjs.wasm to be in ts/ --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 334e106d..61e306ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: # Thus, we install the binary nodejs from nodejs.org and test with that. curl https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz > nodejs.tar.xz tar xvvf nodejs.tar.xz - export PATH=$(echo node-*/bin):$PATH + export PATH=$(pwd)/$(echo node-*/bin):$PATH ./genbindings.sh ./ldk-c-bindings/ wasm false false - name: Build and Test TS Bindings for Web run: | @@ -63,9 +63,10 @@ jobs: mkdir -p $HOME/.cache/ms-playwright # `playwright install` is too dumb to create this for us chmod -R 777 $HOME/ npx playwright install - export PATH=$(echo node-*/bin):$PATH + export PATH=$(pwd)/$(echo node-*/bin):$PATH + cd ts python3 -m http.server & - node ts/test/browser.mjs + node test/browser.mjs - name: Check latest TS files are in git run: | git diff --exit-code diff --git a/genbindings.sh b/genbindings.sh index 25c8ffbe..5576b8db 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -223,13 +223,12 @@ else tsc else tsc --types node --typeRoots . - cd .. if [ -x "$(which node)" ]; then NODE_V="$(node --version)" if [ "${NODE_V:1:2}" -gt 14 ]; then rm -f liblightningjs.wasm - ln -s $WASM_FILE liblightningjs.wasm - node ts/test/node.mjs + ln -s "$(pwd)"/../$WASM_FILE liblightningjs.wasm + node test/node.mjs fi fi fi diff --git a/ts/test/browser.mjs b/ts/test/browser.mjs index fecaa3ec..03b51414 100644 --- a/ts/test/browser.mjs +++ b/ts/test/browser.mjs @@ -5,9 +5,9 @@ for (const browserType of [chromium, firefox]) { // We'd like to test webkit, bu const browser = await browserType.launch(); const context = await browser.newContext(); const page = await context.newPage(); - await page.goto('http://localhost:8000/ts/test/index.html'); + await page.goto('http://localhost:8000/test/index.html'); const ret = await page.evaluate(() => { - return test_runner('../../liblightningjs.wasm'); + return test_runner('../liblightningjs.wasm'); }); assert(ret); diff --git a/ts/test/index.html b/ts/test/index.html index 7c0027eb..0467f91f 100644 --- a/ts/test/index.html +++ b/ts/test/index.html @@ -9,7 +9,7 @@