Skip to content

Commit 49e8999

Browse files
author
betzrhodes
authored
Merge pull request #63 from electricimp/develop
v2.5.2
2 parents b544784 + 80ad3b5 commit 49e8999

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+778
-943
lines changed

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
/node_modules
2+
spec/.DS_Store
3+
.DS_Store
4+
bin/.DS_Store
5+
bin/cmds/.DS_Store

Diff for: .travis.yml

-8
This file was deleted.

Diff for: CommandsManual.md

+97-91
Large diffs are not rendered by default.

Diff for: DevelopmentGuide.md

+147-149
Large diffs are not rendered by default.

Diff for: ProductionGuide.md

+94-77
Large diffs are not rendered by default.

Diff for: README.md

+40-37
Large diffs are not rendered by default.

Diff for: TestingGuide.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Tests may call external (eg. a host operating system) commands; please find furt
117117

118118
[Assertions](#assertions) and [diagnostic messages](#diagnostic-messages) are also available for your tests.
119119

120-
**Example**
120+
#### Example ####
121121

122122
```squirrel
123123
class MyTestCase extends ImpTestCase {
@@ -148,7 +148,7 @@ For example, `"Test1.agent.test.nut"` (a test file with test cases for agent cod
148148

149149
**Note** It is sufficient that only the test file is selected for the run, ie. it satisfies the test file search pattern defined during [test configuration](#test-configuration). The corresponding partner file will be added to the test session automatically.
150150

151-
**Example**
151+
#### Example ####
152152

153153
Test file `"Test1.agent.test.nut"`:
154154

@@ -194,7 +194,7 @@ Every test method, including *setUp()* and *tearDown()*, can be run either synch
194194

195195
Test methods should return an instance of the [Promise](https://github.com/electricimp/Promise) class if it needs to do some work asynchronously. The resolution of the Promise indicates that the test has been passed. The rejection of the Promise denotes a failure.
196196

197-
**Example**
197+
#### Example ####
198198

199199
```squirrel
200200
function testSomethingAsynchronously() {
@@ -290,7 +290,7 @@ The following assertions are available in tests:
290290

291291
Asserts that the condition is truthful.
292292

293-
**Example**
293+
#### Example ####
294294

295295
```squirrel
296296
// OK
@@ -306,7 +306,7 @@ this.assertTrue(1 == 2);
306306

307307
Asserts that two values are equal.
308308

309-
**Example**
309+
#### Example ####
310310

311311
```squirrel
312312
// OK
@@ -322,7 +322,7 @@ this.assertEqual(1, 2);
322322

323323
Asserts that a value is greater than some other value.
324324

325-
**Example**
325+
#### Example ####
326326

327327
```squirrel
328328
// OK
@@ -338,7 +338,7 @@ this.assertGreater(1, 2);
338338

339339
Asserts that a value is less than some other value.
340340

341-
**Example**
341+
#### Example ####
342342

343343
```squirrel
344344
// OK
@@ -354,7 +354,7 @@ this.assertLess(2, 2);
354354

355355
Asserts that a value is within a specified range of an expected value.
356356

357-
**Example**
357+
#### Example ####
358358

359359
```squirrel
360360
// OK
@@ -370,7 +370,7 @@ this.assertClose(10, 9, 0.5);
370370

371371
Performs a deep comparison of tables, arrays and classes.
372372

373-
**Example**
373+
#### Example ####
374374

375375
```squirrel
376376
// OK
@@ -392,7 +392,7 @@ this.assertDeepEqual({"a" : { "b" : 1 }}, {"a" : { "b" : 0 }});
392392

393393
Asserts that a value belongs to the range from _from_ to _to_.
394394

395-
**Example**
395+
#### Example ####
396396

397397
```squirrel
398398
// OK
@@ -408,7 +408,7 @@ this.assertBetween(10, 11, 12);
408408

409409
Asserts that the function _func_ throws an error when it is called with the arguments _args_ and the context _ctx_. Returns an error thrown by _func_.
410410

411-
**Example**
411+
#### Example ####
412412

413413
```squirrel
414414
// OK, returns "abc"
@@ -432,7 +432,7 @@ There are three ways to display diagnostic messages in the console from your tes
432432

433433
Examples of tests output are provided in the [section on running tests](#running-tests).
434434

435-
### A Test Case Example ###
435+
#### A Test Case Example ####
436436

437437
The utility file `myFile.nut` contains the following code:
438438

@@ -533,7 +533,7 @@ The configuration settings include:
533533

534534
- `--timeout`, `--stop-on-fail`, `--allow-disconnect`, `--builder-cache` — Other settings, their meaning and default values are described in the [command’s spec](./CommandsManual.md#test-create).
535535

536-
**Example**
536+
#### Example ####
537537

538538
```bash
539539
> impt test create --dg MyTestDG --agent-file MyLibrary.agent.lib.nut
@@ -566,7 +566,7 @@ IMPT COMMAND SUCCEEDS
566566

567567
You may update the test configuration by calling [`impt test update`](./CommandsManual.md#test-update). The existing [test configuration file](./CommandsManual.md#test-configuration-files) will be updated with the new settings. The new `--test-file` option value(s) completely replace any existing setting.
568568

569-
**Example**
569+
#### Example ####
570570

571571
```bash
572572
> impt test update --timeout 60 --builder-cache true
@@ -597,7 +597,7 @@ IMPT COMMAND SUCCEEDS
597597

598598
You may also display the current test configuration by calling [`impt test info`](./CommandsManual.md#test-info).
599599

600-
**Example**
600+
#### Example ####
601601

602602
```bash
603603
> impt test info
@@ -639,7 +639,7 @@ For unauthenticated requests, the GitHub API allows you to make [up to 60 reques
639639
- This file may be created or updated with [`impt test github`](./CommandsManual.md#test-github). You specify a GitHub username and password, and they are saved in the specified file. **Important** The credentials are stored in a plain text.
640640
- You may have several GitHub credential files and they may be located in any place. You specify a concrete GitHub credentials file during [test configuration](#test-configuration). If the specified file exists when you [run the tests](#running-tests), the GitHub credentials are taken from it. If the specified file does not exist, the GitHub credentials are taken from the environment variables, if they are set.
641641

642-
**Example**
642+
#### Example ####
643643

644644
```bash
645645
> impt test github --github-config github.conf --user github_username
@@ -666,7 +666,7 @@ Every test is treated as failed if an error is thrown or a timeout, as defined i
666666

667667
When all tests are passed, the [`impt test run`](./CommandsManual.md#test-run) command outputs `IMPT COMMAND SUCCEEDS` and returns an exit code of zero. Otherwise, it outputs `IMPT COMMAND FAILS` and returns a non-zero exit code.
668668

669-
**Example: Testing Failed**
669+
#### Example: Testing Failed ####
670670

671671
```bash
672672
> impt test run
@@ -703,7 +703,7 @@ Error: Testing failed
703703
IMPT COMMAND FAILS
704704
```
705705
706-
**Example: All Tests Passed**
706+
#### Example: All Tests Passed ####
707707
708708
```bash
709709
> impt test run
@@ -749,7 +749,7 @@ The `--tests <testcase_pattern>` option of the [`impt test run`](./CommandsManua
749749

750750
- `testMethod` is the name of a test method. Should be fully qualified. Test methods with an identical name may exist in different test cases; in this situation all of them will be selected if the cases are selected.
751751

752-
**Example**
752+
#### Example ####
753753

754754
A test file `TestFile1.test.nut` contains:
755755

@@ -790,7 +790,7 @@ You may run your tests in debug mode by specifying the `--output debug` option o
790790
- All communications with the [*impUnit* test framework](https://github.com/electricimp/impUnit) are displayed in the console.
791791
- Device and agent code for all the running builds are placed in the `.build` folder inside the test home.
792792

793-
**Example**
793+
#### Example ####
794794

795795
```bash
796796
> impt test run --tests TestFile1:MyTestCase::testMe --output debug
@@ -879,7 +879,7 @@ IMPT COMMAND SUCCEEDS
879879

880880
After testing is complete, you may want to clean the various entities created during testing. If you want to delete your test project, call [`impt test delete`](./CommandsManual.md#test-delete) from the test home. This deletes the [test configuration file](./CommandsManual.md#test-configuration-files), the *Builder* cache directory and any debug information. By specifying additional options you may also delete the GitHub credentials file, any file containing *Builder* variables, and impCentral API entities (Device Group, Deployments, Product) which were used or created during testing. Please see the [delete command’s spec](./CommandsManual.md#test-delete) for more information.
881881

882-
**Example**
882+
#### Example ####
883883

884884
```bash
885885
> impt test delete --all
@@ -929,7 +929,7 @@ IMPT COMMAND SUCCEEDS
929929

930930
Alternatively, you may fully delete the Device Group which you used for the testing by calling `impt dg delete --dg <DEVICE_GROUP_IDENTIFIER> --builds --force`. This fully cleans all of the impCentral entities created during testing, unassigns all devices from the Device Group, deletes all builds created for the Device Group, and deletes the Device Group itself.
931931

932-
**Example**
932+
#### Example ####
933933

934934
```bash
935935
> impt dg delete --dg MyTestDG --builds --force
@@ -969,7 +969,7 @@ IMPT COMMAND SUCCEEDS
969969

970970
If you only want to unassign the devices from the testing Device Group, use [`impt dg unassign`](./CommandsManual.md#device-group-unassign) or [`impt device unassign`](./CommandsManual.md#device-unassign).
971971

972-
**Example**
972+
#### Example ####
973973

974974
```bash
975975
> impt dg unassign --dg MyTestDG
@@ -991,7 +991,7 @@ IMPT COMMAND SUCCEEDS
991991

992992
If you want to delete the Product, use [`impt product delete`](./CommandsManual.md#product-delete).
993993

994-
**Example**
994+
#### Example ####
995995

996996
```bash
997997
> impt product delete --product MyTestProduct --builds --force

Diff for: lib/util/ImpCentralApiHelper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ class ImpCentralApiHelper {
482482
LogStreams.FORMAT_JSON)).
483483
then((logStream) => {
484484
return new Promise((resolve) => {
485-
setTimeout(() => { resolve(logStream); }, 500);
485+
setTimeout(() => { resolve(logStream); }, 1000);
486486
});
487487
}).
488488
then((logStream) => {

Diff for: package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imp-central-impt",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "impt - command line tool for the Electric Imp impCentral API",
55
"main": "bin/impt",
66
"engines": {

0 commit comments

Comments
 (0)