mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
14 lines
499 B
JavaScript
14 lines
499 B
JavaScript
//test the tone.js build
|
|
const Tone = require("../../");
|
|
const assert = require("assert");
|
|
const { resolve } = require("path");
|
|
const fs = require("fs");
|
|
const semver = require("semver");
|
|
|
|
assert.strictEqual(Tone.global, global);
|
|
|
|
//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");
|