Skip to content

Commit

Permalink
refactor(override-configuration-spec): merge tests
Browse files Browse the repository at this point in the history
Firefox 54 seems to run into a strage race condition with this tests,
so I'm merging into the previous test
  • Loading branch information
marcoscaceres authored and Marcos Cáceres committed Jul 6, 2017
1 parent 3ffd0cd commit 723d5f3
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions tests/spec/core/override-configuration-spec.js
Expand Up @@ -5,11 +5,15 @@ describe("Core — Override Configuration", () => {
done();
});
const simpleURL = new URL("./spec/core/simple.html", document.location);
it("overrides a simple string setting", done => {
it("overrides a simple string setting and decodes URL key/values strings correctly", done => {
const url = new URL(simpleURL.href);
url.searchParams.set("specStatus", "RSCND");
url.searchParams.set("previousMaturity", "REC");
url.searchParams.set("previousPublishDate", "1994-03-01");
url.searchParams.set(
"additionalCopyrightHolders",
"Internet Engineering Task Force"
);
const test = doc => {
const { respecConfig: conf } = doc.defaultView;
const { textContent } = doc.querySelector(".head h2");
Expand All @@ -18,17 +22,6 @@ describe("Core — Override Configuration", () => {
expect(month).toEqual(2);
const { previousMaturity } = conf;
expect(previousMaturity).toEqual("REC");
done();
};
makeRSDoc(makeStandardOps(), test, url);
});
it("decodes URL key/values strings correctly", done => {
const url = new URL(simpleURL.href);
url.searchParams.set(
"additionalCopyrightHolders",
"Internet Engineering Task Force"
);
const test = doc => {
const copyrightText = doc.querySelector(".copyright").textContent;
expect(copyrightText).toMatch(/Internet Engineering Task Force/);
done();
Expand Down

0 comments on commit 723d5f3

Please sign in to comment.