add global test

This commit is contained in:
silverwind 2020-07-21 22:41:43 +02:00
parent 5f095fe7cc
commit fa7a6e36f0
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

11
test.js

@ -111,6 +111,17 @@ test("simple", async () => {
expect(exitCode).toEqual(0);
});
if (process.env.CI) {
test("global", async () => {
await execa("npm", ["i", "-g", "."]);
const {stdout, stderr, exitCode} = await execa("updates", ["-C", "-G", githubUrl, "-f", testFile]);
expect(stderr).toEqual("");
expect(stdout).toInclude("prismjs");
expect(stdout).toInclude("https://github.com/silverwind/updates");
expect(exitCode).toEqual(0);
});
}
test("latest", makeTest("-j", {
dependencies: {
"gulp-sourcemaps": {