JamesJ
Denoβ€’2mo agoβ€’
5 replies
James

Test Case Names Disappearing?

Has anyone else run into this? Some of my test case names disappear:
running 15 tests from ./tests/config_test.js
Configuration can be loaded from options only ... ok (19ms)
 ok (8ms)
Configuration options take precedence over data object ... ok (4ms)
 ok (6ms)
Configuration has data object data ... ok (2ms)


The lines starting with "ok" are individual test cases with names. But the names don't show up... It is always the same test cases too, regardless of where I place them. Here is an example of the first two test cases, the first appears, the second doesn't:

Deno.test({
    name: "Configuration can be loaded from options only",
    fn: async () => {
        const config = await Config.load(defaultOptions, undefined);
        assertEquals(config.src, "mySrc");
        assertEquals(config.templates, "myTemplates");
        assertEquals(config.out, "myOut");
        assertFalse(config.isDev);
        assertFalse(config.isDebug);
    },
});

Deno.test({
    name: "Configuration can be loaded from data object only",
    fn: async () => {
        const config = await Config.load({}, dataFilePath("defaultData.js"));
        assertEquals(dataRelativePath(config.src), "myDataSrc");
        assertEquals(dataRelativePath(config.templates), "myDataTemplates");
        assertEquals(dataRelativePath(config.out), "myDataOut");
        assertFalse(config.isDev);
        assertFalse(config.isDebug);
    },
});


I can't see any obvious differences between them, but maybe I'm just missing something obvious.
Was this page helpful?