mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 18:46:17 +00:00
Merge remote-tracking branch 'origin/master' into dlech
This commit is contained in:
@@ -20,7 +20,7 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"checkingForUpdate": false,
|
||||
"hasUnresolvedInstallPrompt": false,
|
||||
"isServiceWorkerRegistered": false,
|
||||
|
||||
@@ -24,7 +24,7 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"connection": "ble.connection.state.disconnected",
|
||||
"deviceBatteryCharging": false,
|
||||
"deviceFirmwareVersion": "",
|
||||
|
||||
@@ -291,7 +291,7 @@ describe('handleExplorerCreateNewFile', () => {
|
||||
saga.put(newFileWizardDidAccept('test', pythonFileExtension, Hub.Technic));
|
||||
|
||||
await expect(saga.take()).resolves.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"contents": "from pybricks.hubs import TechnicHub
|
||||
from pybricks.pupdevices import Motor
|
||||
from pybricks.parameters import Button, Color, Direction, Port, Stop
|
||||
|
||||
@@ -9,7 +9,7 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"isInitialized": false,
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -15,13 +15,13 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"flashing": false,
|
||||
"installPybricksDialog": Object {
|
||||
"installPybricksDialog": {
|
||||
"isOpen": false,
|
||||
},
|
||||
"progress": null,
|
||||
"restoreOfficialDialog": Object {
|
||||
"restoreOfficialDialog": {
|
||||
"isOpen": false,
|
||||
},
|
||||
}
|
||||
|
||||
+36
-36
@@ -110,12 +110,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -636,12 +636,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -784,12 +784,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -883,12 +883,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -991,12 +991,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1139,12 +1139,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1273,12 +1273,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
let action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1521,12 +1521,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
let action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1582,12 +1582,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
let action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1644,12 +1644,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
let action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1709,12 +1709,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
let action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
@@ -1811,12 +1811,12 @@ describe('flashFirmware', () => {
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"abiVersion": 5,
|
||||
"options": Array [
|
||||
"options": [
|
||||
"-mno-unicode",
|
||||
],
|
||||
"script": "print(\\"test\\")",
|
||||
"script": "print("test")",
|
||||
"type": "mpy.action.compile",
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -17,7 +17,7 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"downloadProgress": null,
|
||||
"mpyAbiVersion": 6,
|
||||
"runtime": "hub.runtime.disconnected",
|
||||
|
||||
@@ -19,7 +19,7 @@ type State = ReturnType<typeof reducers>;
|
||||
|
||||
test('initial state', () => {
|
||||
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"connection": "bootloader.connection.disconnected",
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -28,9 +28,9 @@ test('compiler error works', async () => {
|
||||
expect(didFailToCompile.matches(action)).toBeTruthy();
|
||||
const { err } = action as ReturnType<typeof didFailToCompile>;
|
||||
expect(err).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"Traceback (most recent call last):",
|
||||
" File \\"main.py\\", line 1",
|
||||
" File "main.py", line 1",
|
||||
"SyntaxError: invalid syntax",
|
||||
]
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user