Skip to content

Commit aa53e31

Browse files
committed
[TS] Change paths to liblightningjs.wasm to be in ts/
1 parent b55840f commit aa53e31

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
# Thus, we install the binary nodejs from nodejs.org and test with that.
5151
curl https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz > nodejs.tar.xz
5252
tar xvvf nodejs.tar.xz
53-
export PATH=$(echo node-*/bin):$PATH
53+
export PATH=$(pwd)/$(echo node-*/bin):$PATH
5454
./genbindings.sh ./ldk-c-bindings/ wasm false false
5555
- name: Build and Test TS Bindings for Web
5656
run: |
@@ -63,9 +63,10 @@ jobs:
6363
mkdir -p $HOME/.cache/ms-playwright # `playwright install` is too dumb to create this for us
6464
chmod -R 777 $HOME/
6565
npx playwright install
66-
export PATH=$(echo node-*/bin):$PATH
66+
export PATH=$(pwd)/$(echo node-*/bin):$PATH
67+
cd ts
6768
python3 -m http.server &
68-
node ts/test/browser.mjs
69+
node test/browser.mjs
6970
- name: Check latest TS files are in git
7071
run: |
7172
git diff --exit-code

genbindings.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,12 @@ else
223223
tsc
224224
else
225225
tsc --types node --typeRoots .
226-
cd ..
227226
if [ -x "$(which node)" ]; then
228227
NODE_V="$(node --version)"
229228
if [ "${NODE_V:1:2}" -gt 14 ]; then
230229
rm -f liblightningjs.wasm
231-
ln -s $WASM_FILE liblightningjs.wasm
232-
node ts/test/node.mjs
230+
ln -s "$(pwd)"/../$WASM_FILE liblightningjs.wasm
231+
node test/node.mjs
233232
fi
234233
fi
235234
fi

ts/test/browser.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ for (const browserType of [chromium, firefox]) { // We'd like to test webkit, bu
55
const browser = await browserType.launch();
66
const context = await browser.newContext();
77
const page = await context.newPage();
8-
await page.goto('http://localhost:8000/ts/test/index.html');
8+
await page.goto('http://localhost:8000/test/index.html');
99
const ret = await page.evaluate(() => {
10-
return test_runner('../../liblightningjs.wasm');
10+
return test_runner('../liblightningjs.wasm');
1111
});
1212
assert(ret);
1313

ts/test/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1><div id="results">Running LDK-TS Tests...</div></h1>
99
<script type="module">
1010
import { run_tests } from './tests.mjs';
1111
try {
12-
const result = run_tests('../../liblightningjs.wasm');
12+
const result = run_tests('../liblightningjs.wasm');
1313
if (result) {
1414
document.getElementById("results").innerHTML = "All Tests Passed (note free-time errors may still occurr)!";
1515
} else {

0 commit comments

Comments
 (0)