Skip to content

Commit

Permalink
Merge pull request #1231 from w3c/test-patch
Browse files Browse the repository at this point in the history
wait for each specberus validation to finish before starting new tests
  • Loading branch information
deniak authored Jan 10, 2025
2 parents cc96b94 + 84fe644 commit 047c70c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ describe('SpecberusWrapper', () => {
});
});

describe('validate(url)', () => {
describe('validate(url)', async () => {
it('should be a function', () => {
expect(SpecberusWrapper.validate).to.be.a('function');
});
Expand All @@ -397,7 +397,7 @@ describe('SpecberusWrapper', () => {
patentPolicy: myDraft.patentPolicy,
});

const content = SpecberusWrapper.validate(myDraft.location, metadata);
const content = await SpecberusWrapper.validate(myDraft.location, metadata);

it('should return a promise', () => {
expect(content).to.be.an.instanceOf(Promise);
Expand All @@ -423,13 +423,13 @@ describe('SpecberusWrapper', () => {
.that.is.an.instanceOf(Map));
});

describe('validate(url-with-css-errors)', () => {
describe('validate(url-with-css-errors)', async () => {
const metadata = new Map({
profile: server.getMetadata('nav-csserror').status,
patentPolicy: server.getMetadata('nav-csserror').patentPolicy,
});

const content = SpecberusWrapper.validate(
const content = await SpecberusWrapper.validate(
server.getMetadata('nav-csserror').location,
metadata,
);
Expand All @@ -441,12 +441,12 @@ describe('SpecberusWrapper', () => {
});
});

describe('validate(url-with-css-warnings)', () => {
describe('validate(url-with-css-warnings)', async () => {
const metadata = new Map({
profile: server.getMetadata('nav-csswarning').status,
patentPolicy: server.getMetadata('nav-csswarning').patentPolicy,
});
const content = SpecberusWrapper.validate(
const content = await SpecberusWrapper.validate(
server.getMetadata('nav-csswarning').location,
metadata,
);
Expand Down

0 comments on commit 047c70c

Please sign in to comment.