2018-08-29 17:54:55 +00:00
|
|
|
//test the tone.js build
|
|
|
|
const Tone = require("../../");
|
|
|
|
const assert = require("assert");
|
2018-08-30 03:08:40 +00:00
|
|
|
const { resolve } = require("path");
|
|
|
|
const fs = require("fs");
|
|
|
|
const semver = require("semver");
|
2018-08-29 17:54:55 +00:00
|
|
|
|
|
|
|
assert.strictEqual(Tone.global, global);
|
2018-08-30 03:08:40 +00:00
|
|
|
|
|
|
|
//test the version
|
|
|
|
const packageFile = resolve(__dirname, "../../package.json");
|
|
|
|
const { version } = JSON.parse(fs.readFileSync(packageFile, "utf-8"));
|
|
|
|
const diff = semver.diff(Tone.version, version);
|
|
|
|
assert(diff === "patch" || diff === null, "wrong version listed");
|