Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Jan 28, 2025
1 parent a1346f8 commit 3d08aa3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/e2e/compile.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Compile Commands', () => {
' particle compile photon Compile the source code in the current directory in the cloud for a `photon`',
' particle compile electron project --saveTo electron.bin Compile the source code in the project directory in the cloud for an `electron` and save it to a file named `electron.bin`',
'',
'Param deviceType can be: core, c, photon, p, p1, electron, e, argon, a, boron, b, xenon, x, esomx, bsom, b5som, tracker, assettracker, trackerm, p2, photon2, msom, muon, electron2',
'Param deviceType can be: core, c, photon, p, p1, electron, e, argon, a, boron, b, xenon, x, esomx, bsom, b5som, tracker, assettracker, trackerm, p2, photon2, msom, muon, electron2, tachyon',
];

beforeEach(async () => {
Expand Down
11 changes: 6 additions & 5 deletions test/e2e/help.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('Help & Unknown Command / Argument Handling', () => {
' publish Publish an event to the cloud',
' serial Simple serial interface to your devices',
' subscribe Listen to device event stream',
' tachyon Setup Particle devices',
' token Manage access tokens (require username/password)',
' udp Talk UDP to repair devices, run patches, check Wi-Fi, and more!',
' update Update Device OS on a device via USB',
Expand All @@ -44,7 +45,7 @@ describe('Help & Unknown Command / Argument Handling', () => {
' variable Retrieve and monitor variables on your device',
' webhook Manage webhooks that react to device event streams',
' whoami prints signed-in username',
' wifi Configure Wi-Fi credentials to your device (Supported on Gen 3+ devices).'
' wifi Configure Wi-Fi credentials to your device (Supported on Gen 3+ devices)'
];

const allCmds = ['binary inspect', 'binary enable-device-protection', 'binary list-assets', 'binary strip-assets', 'binary', 'bundle', 'call', 'cloud list',
Expand All @@ -66,9 +67,9 @@ describe('Help & Unknown Command / Argument Handling', () => {
'product device list', 'product device add', 'product device remove',
'product device', 'product', 'project create', 'project', 'publish',
'serial list', 'serial monitor', 'serial identify', 'serial wifi',
'serial mac', 'serial inspect', 'serial flash',
'serial', 'subscribe', 'token revoke',
'token create', 'token', 'udp send', 'udp listen', 'udp', 'update',
'serial mac', 'serial inspect', 'serial flash', 'serial', 'subscribe',
'tachyon setup', 'tachyon download-package', 'tachyon clean-cache', 'tachyon',
'token revoke', 'token create', 'token', 'udp send', 'udp listen', 'udp', 'update',
'update-cli', 'usb list', 'usb start-listening', 'usb listen',
'usb stop-listening', 'usb safe-mode', 'usb dfu', 'usb reset',
'usb setup-done', 'usb configure', 'usb cloud-status', 'usb network-interfaces', 'usb',
Expand Down Expand Up @@ -109,9 +110,9 @@ describe('Help & Unknown Command / Argument Handling', () => {

it('Shows `help` content when run with unknown flag', async () => {
const { stdout, stderr, exitCode } = await cli.run('--WATNOPE');

expect(stdout).to.equal('Unknown argument \'WATNOPE\'');
expect(stderr.split('\n')).to.include.members(commandList);

expect(exitCode).to.equal(1);
});

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/list.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('List Commands', () => {
' -v, --verbose Increases how much logging to display [count]',
' -q, --quiet Decreases how much logging to display [count]',
'',
'Param filter can be: online, offline, a platform name (core, photon, p1, electron, argon, boron, xenon, esomx, bsom, b5som, tracker, trackerm, p2, msom, electron2), a device ID or name'
'Param filter can be: online, offline, a platform name (core, photon, p1, electron, argon, boron, xenon, esomx, bsom, b5som, tracker, trackerm, p2, msom, electron2, tachyon), a device ID or name'
];

before(async () => {
Expand Down

0 comments on commit 3d08aa3

Please sign in to comment.