Skip to content

Conversation

@professoralex13
Copy link
Contributor

@professoralex13 professoralex13 commented Dec 28, 2023

Using a docker environment to run the wasm in node with jest for testing
includes a major project folder restructure

@professoralex13 professoralex13 changed the title feat: unit tests feat: unit tests and project refactor Dec 29, 2023
@professoralex13 professoralex13 merged commit 3874a16 into v2 Dec 30, 2023
@professoralex13 professoralex13 deleted the unit-tests branch January 11, 2024 01:17
professoralex13 added a commit that referenced this pull request Feb 1, 2024
…01 (#2)

* chore: ignore DS_Store files

* build: create base navdata-sdk module

* build: fix build with navdata-sdk

* build: include navdata-sdk in tsconfig

* refactor: add msfstypes to ts library

* wip(feat/restructure): centralized function call, raw sql query

heavy wip

* refactor: clean up queue processing

* refactor: move lint and lint to root

* refactor: centralize communications between wasm and js, and cleanups

also improves performance for deleting existing downloaded package

* refactor: apply clippy changes

* refactor: rename Request to Task

to not confuse with network requests

* refactor: download status update flow

* refactor: move phase matching logic

* refactor: add typescript interface typings

* refactor: use string values for NavigraphFunction enum

* refactor: use serde for all commbus related things

makes code cleaner and less prone to error

* docs: add note about the navdata interface construction

* refactor: switch instead of if chain

* chore: add temp. CommBus types, use types lib

* refactor: avoid array with `any` callbacks

* refactor: strongly type `callWasmFunction` name param

Using string parameter instead of enum to increase discoverability

* chore: use lowercase for type declaration file

* refactor: improve error handling

* refactor: move msfstypes to base package

* feat: add get airport function

* fix: use string literal instead of enum

* chore: format

* feat: unit tests and project refactor (#1)

* start node running of interface

* refactors

* fix: update `memoryBuffer` after `malloc`

* refactor: add `test_out` directory, fix our path type implementation

* refactor: project structure

* feat: jest test environment

* fix: stop lifecycle once tests completed

* feat: automatic download

* remove unnecessary package

* refactor: Cleanup setup.ts

* fix: make sh files executable

* fix: have build run with docker

* feat: test workflow

* fix: make test.sh executable

* Update test.sh

* test

* Update setup.ts

* Create push.yml

* Update push.yml

* general fixes

* fix: workspace issues

---------

Co-authored-by: Jack Lavigne <[email protected]>

* fix: use params and support number fields in raw sql query

* start new API

* feat: get airports in range

* feat: Airways by ident

* feat: Airways by range

* formatting

* feat: Departures query

* fix: sim issues

* refactor: Move database out of wasm module

* refactor: switch to fully snake_case and other spec compliance

* feat: arrivals

* refactor: procedure mapping

* feat: get_database_info

* refactor: remove uneccesary serde renames

* feat: Approaches

* fix: fix airport_ident

* pad out tests

* feat: Waypoint and VhfNavaid queries

* refactor: Generic range query generator

* feat: get runways at airport

* feat: Waypoint/VhfNavaid range queries

* feat: ndb navaids

* feat: navaid and waypoint airport queries

* feat: get airways at fix

* feat: comments

* feat: Airspace range queries

* fix: missing Database Info type

* fix: approach

* feat: gates

* feat: communications

* feat: Gls navaids

* feat: pathpoints

* improved documentation

* Update README.md

* Update README.md

* Update NavigraphLogin.tsx

* fix: js interface return types

* general fixes

* refactor workflow env

* Revert "refactor workflow env"

This reverts commit dafb9ef.

* refactors and comments in js

* feat: click on qr code to login

* test verbose

* test

* test

* Update pr.yml

* ci: run tests without docker

* ci: run jest directly

* ci: update actions, bump node version

* ci: disable cone mode for sparse-checkout

* ci: exclude blobs instead of sparse

* ci: skip installing packages in docker

This should cause the tests to fail right? I guess the reason it works locally is because it uses the dependencies installed by us on the windows-side...

* ci: run correct test script

* ci: temporarily skip WASM builds

* ci: explicit node version, install deps

* ci: install deps inside docker

* ci: make sure both commands run inside docker

* ci: revert to incorrect (but working) script

This configuration seems to result in successful test runs for some reason ¯\_(ツ)_/¯

* ci: reintroduce WASM build step

* ci: move test run to separate line for clarity

* Delete DOCS.md

---------

Co-authored-by: Malte Hallström <[email protected]>
Co-authored-by: Jack Lavigne <[email protected]>
SkySails added a commit that referenced this pull request Feb 27, 2025
…01 (#2)

* chore: ignore DS_Store files

* build: create base navdata-sdk module

* build: fix build with navdata-sdk

* build: include navdata-sdk in tsconfig

* refactor: add msfstypes to ts library

* wip(feat/restructure): centralized function call, raw sql query

heavy wip

* refactor: clean up queue processing

* refactor: move lint and lint to root

* refactor: centralize communications between wasm and js, and cleanups

also improves performance for deleting existing downloaded package

* refactor: apply clippy changes

* refactor: rename Request to Task

to not confuse with network requests

* refactor: download status update flow

* refactor: move phase matching logic

* refactor: add typescript interface typings

* refactor: use string values for NavigraphFunction enum

* refactor: use serde for all commbus related things

makes code cleaner and less prone to error

* docs: add note about the navdata interface construction

* refactor: switch instead of if chain

* chore: add temp. CommBus types, use types lib

* refactor: avoid array with `any` callbacks

* refactor: strongly type `callWasmFunction` name param

Using string parameter instead of enum to increase discoverability

* chore: use lowercase for type declaration file

* refactor: improve error handling

* refactor: move msfstypes to base package

* feat: add get airport function

* fix: use string literal instead of enum

* chore: format

* feat: unit tests and project refactor (#1)

* start node running of interface

* refactors

* fix: update `memoryBuffer` after `malloc`

* refactor: add `test_out` directory, fix our path type implementation

* refactor: project structure

* feat: jest test environment

* fix: stop lifecycle once tests completed

* feat: automatic download

* remove unnecessary package

* refactor: Cleanup setup.ts

* fix: make sh files executable

* fix: have build run with docker

* feat: test workflow

* fix: make test.sh executable

* Update test.sh

* test

* Update setup.ts

* Create push.yml

* Update push.yml

* general fixes

* fix: workspace issues

---------

Co-authored-by: Jack Lavigne <[email protected]>

* fix: use params and support number fields in raw sql query

* start new API

* feat: get airports in range

* feat: Airways by ident

* feat: Airways by range

* formatting

* feat: Departures query

* fix: sim issues

* refactor: Move database out of wasm module

* refactor: switch to fully snake_case and other spec compliance

* feat: arrivals

* refactor: procedure mapping

* feat: get_database_info

* refactor: remove uneccesary serde renames

* feat: Approaches

* fix: fix airport_ident

* pad out tests

* feat: Waypoint and VhfNavaid queries

* refactor: Generic range query generator

* feat: get runways at airport

* feat: Waypoint/VhfNavaid range queries

* feat: ndb navaids

* feat: navaid and waypoint airport queries

* feat: get airways at fix

* feat: comments

* feat: Airspace range queries

* fix: missing Database Info type

* fix: approach

* feat: gates

* feat: communications

* feat: Gls navaids

* feat: pathpoints

* improved documentation

* Update README.md

* Update README.md

* Update NavigraphLogin.tsx

* fix: js interface return types

* general fixes

* refactor workflow env

* Revert "refactor workflow env"

This reverts commit 38254098670e8125ea96ee326037e09490b0e853.

* refactors and comments in js

* feat: click on qr code to login

* test verbose

* test

* test

* Update pr.yml

* ci: run tests without docker

* ci: run jest directly

* ci: update actions, bump node version

* ci: disable cone mode for sparse-checkout

* ci: exclude blobs instead of sparse

* ci: skip installing packages in docker

This should cause the tests to fail right? I guess the reason it works locally is because it uses the dependencies installed by us on the windows-side...

* ci: run correct test script

* ci: temporarily skip WASM builds

* ci: explicit node version, install deps

* ci: install deps inside docker

* ci: make sure both commands run inside docker

* ci: revert to incorrect (but working) script

This configuration seems to result in successful test runs for some reason ¯\_(ツ)_/¯

* ci: reintroduce WASM build step

* ci: move test run to separate line for clarity

* Delete DOCS.md

---------

Co-authored-by: Malte Hallström <[email protected]>
Co-authored-by: Jack Lavigne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants