Merge remote-tracking branch 'origin/master' into dlech

This commit is contained in:
David Lechner
2022-09-13 14:24:43 -05:00
11 changed files with 505 additions and 729 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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": "",
+1 -1
View File
@@ -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
+1 -1
View File
@@ -9,7 +9,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"isInitialized": false,
}
`);
+3 -3
View File
@@ -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
View File
@@ -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",
}
`);
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -19,7 +19,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"connection": "bootloader.connection.disconnected",
}
`);
+2 -2
View File
@@ -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",
]
`);