Skip to content

Commit 0d51de0

Browse files
committed
WIP: extract backend test container to shared package
1 parent bae97cc commit 0d51de0

File tree

7 files changed

+53
-5
lines changed

7 files changed

+53
-5
lines changed

package-lock.json

Lines changed: 19 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "roslib-test-backend",
3+
"version": "2.0.0",
4+
"description": "Integration test backend for roslib",
5+
"homepage": "https://github.com/RobotWebTools/roslibjs#readme",
6+
"bugs": {
7+
"url": "https://github.com/RobotWebTools/roslibjs/issues"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/RobotWebTools/roslibjs.git"
12+
},
13+
"license": "BSD-2-Clause",
14+
"author": "Robot Webtools Team <[email protected]> (https://robotwebtools.github.io)",
15+
"contributors": [
16+
{
17+
"name": "Ezra Brooks",
18+
"email": "[email protected]",
19+
"url": "https://github.com/EzraBrooks"
20+
}
21+
],
22+
"type": "module",
23+
"main": "ros-backend.ts",
24+
"peerDependencies": {
25+
"roslib": "^2.0.0"
26+
},
27+
"devDependencies": {
28+
"@types/dockerode": "^3.3.47",
29+
"dockerode": "^4.0.9"
30+
}
31+
}

packages/roslib/test/setup/ros-backend.ts renamed to packages/roslib-test-backend/ros-backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import Docker from "dockerode";
7-
import Ros from "../../src/core/Ros.ts";
7+
import { Ros } from "roslib";
88

99
const CONTAINER_NAME = "roslibjs-test-backend";
1010
const CONTAINER_PORT = 9090;

packages/roslib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"jiti": "^2.6.1",
3333
"jsdom": "^27.0.0",
3434
"jspm": "^4.2.0",
35+
"roslib-test-backend": "^2.0.0",
3536
"typedoc": "^0.28.14",
3637
"typescript": "^5.9.2",
3738
"typescript-eslint": "^8.39.0",

packages/roslib/test/setup/vitest-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* This file sets up and tears down the ROS backend container for all tests
44
*/
55

6-
import { setupBackend, teardownBackend } from "./ros-backend.ts";
6+
import { setupBackend, teardownBackend } from "roslib-test-backend";
77

88
// Global setup - runs once before all tests
99
export async function setup() {

0 commit comments

Comments
 (0)