Fork me on GitHub
#clojure-europe
<
2023-02-01
>
schmalz08:02:58

Morning all.

robert-stuttaford09:02:24

good morning. 13 years at Cognician today! 🎉

🎉 26
bananadance 6
2
🍀 2
jasonbell09:02:37

Good morning

genRaiy10:02:58

Morning

❤️ 4
pez10:02:54

Morning! Testing the built Calva extension package (VSIX) using Joyride. Works on My Machine:tm:. Now checking if I have made it work in CI too. If it does it will be one of those rare (for me) ”worked at first try” moments. 😃

pez10:02:14

Of course not.

pez10:02:36

Second try. This time it will work! 😃

pez10:02:03

Whoop, whoop!

thomas10:02:15

no idea what this shows... but it certainly looks good 👍

2
pez10:02:17

This is quite exciting. So a launcher starts VS Code and installs Calva (the VSIX built on CI) and Joyride (latest version from the marketplace). Then it calls a run function. This function usually fires up Mocha and/or other JS testing tools. In our case we execute a VS Code command. 😃 Since Joyride is installed there is a command for evaluating some Clojure code.

const vscode = require('vscode');

exports.run = async () => {
  await vscode.commands.executeCommand('calva.activateCalva');
  return vscode.commands.executeCommand(
    'joyride.runCode',
    "(require '[test-runner :as runner]) (runner/run-all-tests)"
  );
};
We test Joyride itself the same way, but it is also extra cool to test some other extension.

pez10:02:01

Only two simple assertions for now

Runner: Workspace activated, running tests...

Testing tests.a-test
=== calva-required: ✅ ===
=== joyride-required: ✅ ===

Ran 2 tests containing 2 assertions.
0 failures, 0 errors.
But the plumbing is in place. Already to know that the built VSIX works is valuable, sometimes we have forgotten to pack all files and such. And now we can start adding tests!

2
🚀 2
💪 2
Michaël Salihi22:02:02

Morning. Pleasant night walk in Paris. 🙂

😍 10
2
seancorfield23:02:42

It's been far too long since I was last in Paris...

✈️ 2