@wocker/testing 1.0.4 → 1.0.5

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.
@@ -1,8 +1,11 @@
1
1
  import { ProcessService, FileSystemDriver } from "@wocker/core";
2
+ import { Duplex } from "stream";
2
3
  export declare class MockProcessService extends ProcessService {
3
4
  protected readonly driver: FileSystemDriver;
4
5
  protected _pwd: string;
6
+ protected stdout: Duplex;
5
7
  constructor(dataDir: string, driver: FileSystemDriver);
6
8
  pwd(path?: string): string;
7
9
  chdir(path: string): void;
10
+ write(chunk: string | Buffer): boolean;
8
11
  }
@@ -17,12 +17,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.MockProcessService = void 0;
19
19
  const core_1 = require("@wocker/core");
20
+ const stream_1 = require("stream");
20
21
  const path_1 = __importDefault(require("path"));
21
22
  let MockProcessService = class MockProcessService extends core_1.ProcessService {
22
23
  constructor(dataDir, driver) {
23
24
  super();
24
25
  this.driver = driver;
25
26
  this._pwd = dataDir;
27
+ this.stdout = new stream_1.Duplex();
26
28
  }
27
29
  pwd(path = "") {
28
30
  return path_1.default.join(this._pwd, path);
@@ -33,6 +35,9 @@ let MockProcessService = class MockProcessService extends core_1.ProcessService
33
35
  }
34
36
  this._pwd = path;
35
37
  }
38
+ write(chunk) {
39
+ return this.stdout.write(chunk);
40
+ }
36
41
  };
37
42
  exports.MockProcessService = MockProcessService;
38
43
  exports.MockProcessService = MockProcessService = __decorate([
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wocker/testing",
3
3
  "type": "commonjs",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "author": "Kris Papercut <krispcut@gmail.com>",
6
6
  "description": "Docker workspace for web projects (testing)",
7
7
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "^30.0.0",
39
- "@wocker/core": "^1.0.26",
39
+ "@wocker/core": "^1.0.28",
40
40
  "docker-modem": "*",
41
41
  "dockerode": "*",
42
42
  "jest": "^30.1.3",