You Qouk, I Qouk, Everyone Qoukka Qoukka

Anyone look at, and/or setup anything with Aurelia and Qoukka.js?
Looks pretty interesting. Love Wallaby.js when I can use it.

https://quokkajs.com

1 Like

I have a sample repo with wallaby.js setup.
It is based on "aurelia-cli": "^1.0.0-beta.13"
(Note, that I only got wallaby running with jest and not with karma)

Haven’t tried it out with quokka yet.

Edit: Forgot to link the repo

1 Like

Interesting, I was able to get Wallaby working with Mocha along with chai/sinon as well.
wallably.config

module.exports = function (wallaby)
{
    var path = require('path');

    process.env.NODE_PATH += path.delimiter + wallaby.projectCacheDir + path.delimiter + 'src';

    return {

        debug: false,

        files: [
            { pattern: 'node_modules/chai/chai.js', instrument: false, load: true },
            { pattern: 'node_modules/sinon/pkg/sinon.js', instrument: false, load: true },
            { pattern: 'tsconfig.json' },
            { pattern: 'src/**/*.ts' },
            { pattern: 'src/**/*.html' },
            { pattern: 'test/**/*.ts' },
            { pattern: '!test/unit/**/*.spec.ts' }
        ],

        tests: ['test/unit/**/*.spec.ts'],

        env: {
            type: 'node',
            runner: 'node'
        },

        testFramework: 'mocha',

        compilers: {
            '**/*.ts': wallaby.compilers.typeScript({
                module: 'commonjs',
                baseUrl: './src'
            })
        },

        //executed in test framework context
        setup: function (wallaby) 
        {
            chai.use(require('chai-datetime'));
        }
    };
};

tshook.js

require("ts-node").register({
    project: "tsconfig.test.json",
});

tsconfig.test.json

{
    "compileOnSave": false,
    "compilerOptions": {
        "sourceMap": true,
        "target": "es6",
        "module": "commonjs",
        "declaration": false,
        "noImplicitAny": false,
        "removeComments": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "allowJs": true,
        "moduleResolution": "node",
        "lib": [
            "es2017",
            "dom"
        ],
        "baseUrl": "./src"
    },
    "include": [
        "./src/**/*.ts",
        "./test/**/*.ts",
        "./custom_typings/**/*.d.ts"
    ],
    "atom": {
        "rewriteTsconfig": false
    }
}
1 Like

I feel stupid to ask but I cant imagine what I’d use quokka for. Can you share some use-cases? Potentially Aurelia related?

1 Like

So its somewhat new (at least to me) and I don’t have a well thought out or specific Aurelia use-case per say.

So here are some scattered thoughts…
I have a couple of things that just looking at the Qoukka site examples that I think are nice features. I like that I am not trying to figure out how to use jsfiddle or codepen to pull in outside scripts,
/ npm modules or compile with ts or babel or whatever. I can stay in VSCode, use project and installed npm modules, and I love the ability to look into the promise results without having to type in a bunch of console.log calls with live comments, etc…(just appears to be more abbreviated to me using this)

For Aurelia I was thinking it might be a lot easier for people having issues to provide examples that would say, use the skeleton app as the project, and then create a snippet showing the issue and could be copied/pasted more easily to run and look at with full debugging ability.

2 Likes

Sounds interesting from the aspect of easier fiddle reproduction. Please make sure to report back your experience when you get it to work. Also the creator of the tool, Artem was his name I believe, also helped us with getting up a working sample for Wallaby, maybe he can help you with Quokka as well. He’s super friendly so make sure to reach out to him.

2 Likes