mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
[FL-3918] Full-fledged JS SDK + npm packages (#3963)
* feat: js sdk * refactor: move js back where it belongs * docs: generate docs using typedoc * feat: sdk versioning scheme * ci: silence pvs warning * docs: bring back old incomplete js docs * style: readAnalog naming * fix: rename script compatibility screens Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
let tests = require("tests");
|
||||
let flipper = require("flipper");
|
||||
|
||||
tests.assert_eq(1337, 1337);
|
||||
tests.assert_eq("hello", "hello");
|
||||
|
||||
tests.assert_eq("compatible", sdkCompatibilityStatus(0, 1));
|
||||
tests.assert_eq("firmwareTooOld", sdkCompatibilityStatus(100500, 0));
|
||||
tests.assert_eq("firmwareTooNew", sdkCompatibilityStatus(-100500, 0));
|
||||
tests.assert_eq(true, doesSdkSupport(["baseline"]));
|
||||
tests.assert_eq(false, doesSdkSupport(["abobus", "other-nonexistent-feature"]));
|
||||
|
||||
tests.assert_eq("flipperdevices", flipper.firmwareVendor);
|
||||
tests.assert_eq(0, flipper.jsSdkVersion[0]);
|
||||
tests.assert_eq(1, flipper.jsSdkVersion[1]);
|
||||
|
||||
Reference in New Issue
Block a user