From f57ad57e6270a144185bfa3e4c665e4cbcfc996b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 7 Feb 2017 19:35:51 -0300 Subject: [PATCH] unit test global.version --- tests/unit/global_vars/root_path_spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/global_vars/root_path_spec.js b/tests/unit/global_vars/root_path_spec.js index 3da29be1..197ee6a7 100644 --- a/tests/unit/global_vars/root_path_spec.js +++ b/tests/unit/global_vars/root_path_spec.js @@ -61,5 +61,11 @@ describe("'global.root_path' set in js/app.js", function() { it("should not modify global.version for testing", function() { expect(global.version).to.equal(undefined); }); + + it("should expect the global.version equals package.json file", function() { + version_package = JSON.parse(fs.readFileSync("package.json", "utf8")).version; + expect(this.sandbox.global.version).to.equal(version_package); + }); + });