aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2018-10-02 23:00:02 +0200
committerhackademix <giorgio@maone.net>2018-10-02 23:00:22 +0200
commit12bfe0f9fdad5bfea680d897c81319684ee82180 (patch)
treec18b97da3aa8cf115e93791be4c4c1ad07e21933 /test
parentc82d0a82f4246667e1ac1238be4121fcaffdde6a (diff)
Adjusting for the fixes to the malformed license parsing.
Diffstat (limited to 'test')
-rw-r--r--test/spec/LibreJSSpec.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/spec/LibreJSSpec.js b/test/spec/LibreJSSpec.js
index eba69b5..3d61973 100644
--- a/test/spec/LibreJSSpec.js
+++ b/test/spec/LibreJSSpec.js
@@ -21,10 +21,6 @@
"use strict";
describe("LibreJS' components", () => {
- const LENIENT_TAG_MSG =
- `actual requirement? at this moment (20181001)
- formal validity only gets checked, therefore this test would fail.`;
-
let LibreJS = browser.extension.getBackgroundPage().LibreJS;
let license = {
id: 'GPL-3.0',
@@ -39,8 +35,8 @@ describe("LibreJS' components", () => {
let trivial = "1+1";
let nontrivial = `function nt() { document.documentElement.innerHTML=""; nt(); }`;
- let licensed = `// @license ${license.id} ${license.magnet}\n${nontrivial}\n// @license-end`;
- let unknownLicensed = `// @license ${unknownLicense.id} ${unknownLicense.magnet}\n${nontrivial}\n// @license-end`;
+ let licensed = `// @license ${license.magnet} ${license.id}\n${nontrivial}\n// @license-end`;
+ let unknownLicensed = `// @license ${unknownLicense.magnet} ${unknownLicense.id}\n${nontrivial}\n// @license-end`;
let malformedLicensed = `// @license\n${nontrivial}`;
let tab, documentUrl;
@@ -79,10 +75,10 @@ describe("LibreJS' components", () => {
expect(processed || licensed).toContain(nontrivial);
});
- xit("should block scripts with unknown license tags", async () => {
+ it("should block scripts with unknown license tags", async () => {
let processed = await processScript(unknownLicensed);
expect(processed).not.toContain(nontrivial);
- }).pend(LENIENT_TAG_MSG);
+ });
it("should block scripts with malformed license tags", async () => {
let processed = await processScript(malformedLicensed);
@@ -137,11 +133,11 @@ describe("LibreJS' components", () => {
expect(extractScripts(processed, licensed)).toContain(nontrivial);
});
- xit("should block scripts with unknown license tags", async () => {
+ it("should block scripts with unknown license tags", async () => {
let unknownInHtml = addScript(html, unknownLicensed);
let processed = await processHtml(unknownInHtml);
expect(extractScripts(processed, nontrivial)).not.toContain(nontrivial);
- }).pend(LENIENT_TAG_MSG);
+ });
it("should block scripts with malformed license tags", async () => {
let malformedInHtml = addScript(html, malformedLicensed);