Skip to content

Commit

Permalink
[js] Increase test timeout for examples (#323)
Browse files Browse the repository at this point in the history
* [js] Increase test timeout for examples (#7521)

GitOrigin-RevId: 77e4041c30273a569e762489ab040309ac2e0a5a

* [docs/umame-docs] use next link for nav links and fix spacing

GitOrigin-RevId: ad7af1101c50d2c826feee20fb231b159143277c

* CI update lock file for PR

* [docs/umame-docs] remove scrollbars from collapsibles, navs, and language switchers (LIG-3881) (#7526)

- removes scrollbars from all collapsibles
- removes from sidenavs
- removes horizontal scroll in any article codeblocks

GitOrigin-RevId: ceef10a4919ef8de0e630f79af7ce1781b295c4c

* [docs] make header IDs always match anchor links (LIG-3866) (#7531)

GitOrigin-RevId: 858f145af7f89dc0eedb027ec103febed53f5d4b

* [lightspark-sdk] Add test for withdrawals and to close all channels for better payment success (#7435)

GitOrigin-RevId: f7ac67ff81f452de7f5b06852317362e33d5c6bb

* [lightspark-sdk] Increase timeout even more (#7537)

GitOrigin-RevId: 93471cdbbae1a0c7610b0ee75e6302e01f94c53f

* [ui] prevent LightboxImage from stretching pngs (LIG-3872) (#7549)

GitOrigin-RevId: 9af64cba41e78cb8c4aa756b2844e777feafb6c3

* [lightspark-sdk] Increase poll interval (#7545)

GitOrigin-RevId: 8c1b96a90c4771475b52f85acb3fff955cf54fd2

* Update the JS uma vasp sdk to pick up the displayDecimals field (#7613)

GitOrigin-RevId: 12506282f9bb2fb9cad5aa8bf3098852fab12920

* CI update lock file for PR

* [js/apps] Run server tests on different ports (#7624)

GitOrigin-RevId: 1028f32dd1cdbec23d3252229960682e2b856a26

* Update from public js-sdk main branch (#7522)

Update public `js` sources with the latest code from the [public
repository](https://github.com/lightsparkdev/js-sdk) main branch.

This typically happens when new versions of the SDK are released and
version updates need to be synced. The PR should be merged as soon as
possible to avoid updates to webdev overwriting the changes in the
js-sdk develop branch.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Corey Martin <[email protected]>
GitOrigin-RevId: 6eb2f6db4fec677c379aec2bdeea11c87c3b7bf9

* CI update lock file for PR

---------

Co-authored-by: Corey Martin <[email protected]>
Co-authored-by: Brian Siao Tick Chong <[email protected]>
Co-authored-by: Lightspark Eng <[email protected]>
Co-authored-by: Jeremy Klein <[email protected]>
Co-authored-by: lightspark-ci-js-sdk[bot] <134011073+lightspark-ci-js-sdk[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
7 people authored Nov 18, 2023
1 parent 68275ea commit 9314d03
Show file tree
Hide file tree
Showing 14 changed files with 229 additions and 216 deletions.
1 change: 0 additions & 1 deletion apps/examples/remote-signing-server/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
testTimeout: 20_000,
transform: {
"^.+\\.tsx?$": [
"ts-jest",
Expand Down
3 changes: 2 additions & 1 deletion apps/examples/remote-signing-server/server.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { jest } from "@jest/globals";
import { LightsparkClient } from "@lightsparkdev/lightspark-sdk";
import supertest from "supertest";
import settings from "../settings.json" assert { type: "json" };
import { app } from "./src/index.js";

declare global {
Expand All @@ -17,7 +18,7 @@ describe("Test server routes", () => {
let request = supertest(app);

beforeAll((done) => {
server = app.listen(4000, done);
server = app.listen(settings.remoteSigningServer, done);
request = supertest(server);
});

Expand Down
2 changes: 1 addition & 1 deletion apps/examples/uma-vasp/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
testTimeout: 20_000,
testTimeout: 60_000,
transform: {
"^.+\\.tsx?$": [
"ts-jest",
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/uma-vasp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@lightsparkdev/core": "1.0.10",
"@lightsparkdev/lightspark-sdk": "1.2.1",
"@uma-sdk/core": "^0.2.0",
"@uma-sdk/core": "^0.3.0",
"express": "^4.18.2",
"zod": "^3.22.4"
},
Expand Down
7 changes: 3 additions & 4 deletions apps/examples/uma-vasp/server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import supertest from "supertest";
import settings from "../settings.json" assert { type: "json" };
import { app } from "./src/index.js";

declare global {
Expand All @@ -22,7 +23,7 @@ describe("Test server routes", () => {
let request = supertest(app);

beforeAll((done) => {
server = app.listen(4000, done);
server = app.listen(settings.umaVasp, done);
request = supertest(server);
});

Expand All @@ -31,9 +32,7 @@ describe("Test server routes", () => {
});

test("fetches pub keys", async () => {
const response = await request
.get("/.well-known/lnurlpubkey")
.send();
const response = await request.get("/.well-known/lnurlpubkey").send();

expect(response.status).toBe(200);
expect(response.body).toEqual({
Expand Down
1 change: 1 addition & 0 deletions apps/examples/uma-vasp/src/ReceivingVasp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export default class ReceivingVasp {
maxSendable: 10_000_000,
minSendable: 1,
multiplier: 34_150,
displayDecimals: 2,
},
],
});
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/requester/Requester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ class Requester {

logger.info(`Requester.makeRawRequest`, {
url,
operationName: operation,
variables,
});
const response = await fetch(url, {
Expand Down
3 changes: 0 additions & 3 deletions packages/lightspark-sdk/src/tests/integration/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ export const INVOICE_EXPIRY = 172800; //ms
export const TRANSACTION_WAIT_TIME = TESTS_TIMEOUT / 1000; //seconds
export const PAGINATION_STEP = 3;

export const PAY_AMOUNT = 1_000; //msats
export const MAX_FEE = 10000000; //msats

export const REGTEST_SIGNING_KEY_PASSWORD = "1234!@#$";
export const ENCODED_REGTEST_REQUEST_FOR_TESTS =
"lnbcrt1pjj6zu2pp50qr2p79v65u9l8w3859259yj9fe5nt79hfw5k2am424440tlj09qdq0dp5jqargv4ex2ggcqzpgxqyz5vqsp5v0z0fu99jf37xcasu88evuphx9kdrpvtupdvhu329kx7k7un59zs9qyyssqegzx986rszy96te2kmxl7prlz0p8avthpwzhsz5v220uek7xxrz54svdsjpzwn04m6utj5ua9tmtktygc5xmjmjaqey9dadt33r8gxspvcg8wv";
Loading

0 comments on commit 9314d03

Please sign in to comment.