Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("dependencies is not the same", async function() {
const pluginSourcePath = path.join(__dirname, "my-plugin-with-diff-dep");
await manager.installFromPath(pluginSourcePath);
const pluginDebugInstance = manager.require("debug/package.json");
// tslint:disable-next-line:no-submodule-imports
const hostDebugInstance = require("debug/package.json");
assert.equal(pluginDebugInstance.version, "2.6.9");
assert.equal(hostDebugInstance.version.substring(0, 1), "4");
assert.notEqual(pluginDebugInstance.version, hostDebugInstance.version); // I expect to be different (v2 vs v3)
});
});
it("dependencies is not the same", async function() {
const pluginSourcePath = path.join(__dirname, "my-plugin-with-diff-dep");
await manager.installFromPath(pluginSourcePath);
const pluginDebugInstance = manager.require("debug/package.json");
// tslint:disable-next-line:no-submodule-imports
const hostDebugInstance = require("debug/package.json");
assert.equal(pluginDebugInstance.version, "2.6.9");
assert.equal(hostDebugInstance.version.substring(0, 1), "4");
assert.notEqual(pluginDebugInstance.version, hostDebugInstance.version); // I expect to be different (v2 vs v3)
});
});
return __awaiter(this, void 0, void 0, function* () {
const pluginSourcePath = path.join(__dirname, "my-plugin-with-diff-dep");
yield manager.installFromPath(pluginSourcePath);
const pluginDebugInstance = manager.require("debug/package.json");
// tslint:disable-next-line:no-submodule-imports
const hostDebugInstance = require("debug/package.json");
chai_1.assert.equal(pluginDebugInstance.version, "2.6.9");
chai_1.assert.equal(hostDebugInstance.version.substring(0, 1), "4");
chai_1.assert.notEqual(pluginDebugInstance.version, hostDebugInstance.version); // I expect to be different (v2 vs v3)
});
});
return __awaiter(this, void 0, void 0, function* () {
const pluginSourcePath = path.join(__dirname, "my-plugin-with-diff-dep");
yield manager.installFromPath(pluginSourcePath);
const pluginDebugInstance = manager.require("debug/package.json");
// tslint:disable-next-line:no-submodule-imports
const hostDebugInstance = require("debug/package.json");
chai_1.assert.equal(pluginDebugInstance.version, "2.6.9");
chai_1.assert.equal(hostDebugInstance.version.substring(0, 1), "4");
chai_1.assert.notEqual(pluginDebugInstance.version, hostDebugInstance.version); // I expect to be different (v2 vs v3)
});
});