Commit def94b37 authored by Guillaume's avatar Guillaume

Jest tests must be defined synchronously

Remove `async` in the describe tests definition.
Resolve the following warning:

> Returning a Promise from "describe" is not supported. Tests must be defined synchronously.
> Returning a value from "describe" will fail the test in a future version of Jest.
parent e6492476
Pipeline #396 failed with stage
in 3 minutes and 6 seconds
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('bleed', async () => {
describe('bleed', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-avoid', async () => {
describe('break-after-avoid', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-left', async () => {
describe('break-after-left', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-page', async () => {
describe('break-after-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-recto', async () => {
describe('break-after-recto', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-right', async () => {
describe('break-after-right', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-after-verso', async () => {
describe('break-after-verso', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-before-avoid', async () => {
describe('break-before-avoid', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-before-left', async () => {
describe('break-before-left', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-before-page', async () => {
describe('break-before-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-before-right', async () => {
describe('break-before-right', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('break-inside-avoid', async () => {
describe('break-inside-avoid', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('breaks', async () => {
describe('breaks', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('counter-page', async () => {
describe('counter-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('counter-pages', async () => {
describe('counter-pages', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('counter-pages', async () => {
describe('counter-pages', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('bleed', async () => {
describe('bleed', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('default', async () => {
describe('default', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('content-none', async () => {
describe('content-none', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('hooks', async () => {
describe('hooks', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('css is awesome', async () => {
describe('css is awesome', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('duplicate-headers', async () => {
describe('duplicate-headers', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('imports', async () => {
describe('imports', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('roman-numerals', async () => {
describe('roman-numerals', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('issue', async () => {
describe('issue', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('margin-box-dimension', async () => {
describe('margin-box-dimension', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('text-align', async () => {
describe('text-align', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('issue', async () => {
describe('issue', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('vertical-align', async () => {
describe('vertical-align', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('marks', async () => {
describe('marks', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('print-media', async () => {
describe('print-media', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('named-page', async () => {
describe('named-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('page-group', async () => {
describe('page-group', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('landscape', async () => {
describe('landscape', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('length', async () => {
describe('length', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('page-size', async () => {
describe('page-size', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('blank-page', async () => {
describe('blank-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('first-page', async () => {
describe('first-page', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('first-page-of-page-group', async () => {
describe('first-page-of-page-group', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('spread-of-page-group', async () => {
describe('spread-of-page-group', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('page-nth', async () => {
describe('page-nth', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('page-spread', async () => {
describe('page-spread', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('lists', async () => {
describe('lists', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('numbering', async () => {
describe('numbering', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000;
describe('text-align-last', async () => {
describe('text-align-last', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe('target-counter', async () => {
describe('target-counter', () => {
let page;
let rendered;
beforeAll(async () => {
......
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe("target-text", async () => {
describe("target-text", () => {
let page;
let rendered;
beforeAll(async () => {
......@@ -28,7 +28,7 @@ describe("target-text", async () => {
let text = await page.$eval("nav li:nth-of-type(3) a" , (r) => window.getComputedStyle(r, "::after").content);
expect(text).toEqual("\"P\"");
});
it("Table of content should include the content of the before pseudo element", async () => {
let text = await page.$eval("nav li:nth-of-type(4) a" , (r) => window.getComputedStyle(r, "::after").content);
expect(text).toEqual("\"This is 'inside' the before:\"");
......
import Chunker from './chunker.js';
describe('Chunker', async () => {
describe('Chunker', () => {
it('should create a page area', async () => {
let chunker = new Chunker();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment