@oclif/test 1.0.6 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ <a name="1.1.0"></a>
2
+ # [1.1.0](https://github.com/oclif/test/compare/bb2466b47bdb57e7852c15f3d8369c296a148db3...v1.1.0) (2018-06-14)
3
+
4
+
5
+ ### Features
6
+
7
+ * updated fancy-test ([9af539d](https://github.com/oclif/test/commit/9af539d))
8
+
9
+ <a name="1.0.9"></a>
10
+ ## [1.0.9](https://github.com/oclif/test/compare/a5beadfcd2868abf6680ab1923157fc272e3583d...v1.0.9) (2018-06-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * updated deps ([bb2466b](https://github.com/oclif/test/commit/bb2466b))
16
+
17
+ <a name="1.0.8"></a>
18
+ ## [1.0.8](https://github.com/oclif/test/compare/18433ffcb770fcb56a51040419b1a6287ddc686c...v1.0.8) (2018-06-01)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * updated deps ([a5beadf](https://github.com/oclif/test/commit/a5beadf))
24
+
25
+ <a name="1.0.7"></a>
26
+ ## [1.0.7](https://github.com/oclif/test/compare/1073eb5982d805f92a4c0399cd18ae61576c0e3d...v1.0.7) (2018-06-01)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * bump deps ([18433ff](https://github.com/oclif/test/commit/18433ff))
32
+
1
33
  <a name="1.0.6"></a>
2
34
  ## [1.0.6](https://github.com/oclif/test/compare/90e407f6cefec2416f9cf33b572db297d6901769...v1.0.6) (2018-05-01)
3
35
 
package/lib/exit.d.ts CHANGED
@@ -4,4 +4,10 @@ declare const _default: (code?: number) => {
4
4
  error: any;
5
5
  }): void;
6
6
  };
7
+ /**
8
+ * ensures that a oclif command or hook exits
9
+ *
10
+ * @param code - expected code
11
+ * @default 0
12
+ */
7
13
  export default _default;
package/lib/hook.d.ts CHANGED
@@ -6,4 +6,15 @@ declare const _default: (event?: string | undefined, hookOpts?: object, options?
6
6
  expectation: string;
7
7
  }): Promise<void>;
8
8
  };
9
+ /**
10
+ * tests a oclif hook
11
+ *
12
+ * @example <caption>check that when the 'init' hook is ran it outputs "this output"</caption>
13
+ * testHook('init', {id: 'mycommand'}, {stdout: true}, output => {
14
+ * expect(output.stdout).to.contain('this output')
15
+ * })
16
+ *
17
+ * @param event - hook to run
18
+ * @param hookOpts - options to pass to hook. Config object will be passed automatically.
19
+ */
9
20
  export default _default;
package/lib/index.d.ts CHANGED
@@ -58,6 +58,14 @@ export declare const test: FancyTypes.Base<FancyTypes.Context, {
58
58
  a3: any;
59
59
  a4: {};
60
60
  };
61
+ } & {
62
+ stdin: {
63
+ output: {};
64
+ a1: string;
65
+ a2: number;
66
+ a3: {};
67
+ a4: {};
68
+ };
61
69
  } & {
62
70
  stderr: {
63
71
  output: {
@@ -84,6 +92,17 @@ export declare const test: FancyTypes.Base<FancyTypes.Context, {
84
92
  a3: {};
85
93
  a4: {};
86
94
  };
95
+ } & {
96
+ nock: {
97
+ output: {
98
+ error?: Error | undefined;
99
+ nock: number;
100
+ };
101
+ a1: string;
102
+ a2: FancyTypes.NockOptions | FancyTypes.NockCallback;
103
+ a3: FancyTypes.NockCallback;
104
+ a4: {};
105
+ };
87
106
  } & {
88
107
  loadConfig: {
89
108
  output: {
@@ -128,4 +147,4 @@ export declare const test: FancyTypes.Base<FancyTypes.Context, {
128
147
  };
129
148
  }>;
130
149
  export default test;
131
- export { expect, FancyTypes, Config, command };
150
+ export { expect, FancyTypes, Config, command, };
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@oclif/test",
3
3
  "description": "test helpers for oclif components",
4
- "version": "1.0.6",
4
+ "version": "1.1.0",
5
5
  "author": "Jeff Dickey @jdxcode",
6
6
  "bugs": "https://github.com/oclif/test/issues",
7
7
  "dependencies": {
8
- "fancy-test": "^1.0.6"
8
+ "fancy-test": "^1.2.0"
9
9
  },
10
10
  "devDependencies": {
11
- "@oclif/command": "^1.4.18",
12
- "@oclif/config": "^1.6.16",
13
- "@oclif/errors": "^1.0.7",
14
- "@oclif/tslint": "^1.1.0",
15
- "@types/chai": "^4.1.3",
16
- "@types/mocha": "^5.2.0",
17
- "@types/node": "^10.0.2",
11
+ "@oclif/command": "^1.4.33",
12
+ "@oclif/config": "^1.6.28",
13
+ "@oclif/errors": "^1.1.2",
14
+ "@oclif/tslint": "^1.1.2",
15
+ "@types/chai": "^4.1.4",
16
+ "@types/mocha": "^5.2.2",
17
+ "@types/node": "^10.3.3",
18
18
  "chai": "^4.1.2",
19
19
  "globby": "^8.0.1",
20
- "mocha": "^5.1.1",
21
- "ts-node": "^6.0.2",
22
- "tslint": "^5.9.1",
23
- "typescript": "^2.8.3"
20
+ "mocha": "^5.2.0",
21
+ "ts-node": "^6.1.1",
22
+ "tslint": "^5.10.0",
23
+ "typescript": "2.9.2"
24
24
  },
25
25
  "engines": {
26
26
  "node": ">=8.0.0"