Skip to content

Commit

Permalink
Replace cumbersome unit tests by integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Dec 15, 2024
1 parent a758e79 commit 3583c88
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 1,623 deletions.
33 changes: 33 additions & 0 deletions tests/eslint.test.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const js = require("@eslint/js");
const stylistic = require("@stylistic/eslint-plugin");
const globals = require("globals");

const customizedStylistic = stylistic.configs.customize({
"indent": 2,
"jsx": false,
"quote-props": "always",
"semi": "always",
"brace-style": "1tbs",
});

module.exports = [
js.configs.recommended,
{
plugins: {
"@stylistic": stylistic,
},
rules: {
...customizedStylistic.rules,
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
},
languageOptions: {
ecmaVersion: 2024,
sourceType: "module",
globals: {
...globals.node,
...globals.mocha,
},
},
},
];
12 changes: 12 additions & 0 deletions tests/fixtures/common.expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (<%= @success %>) {
console.log("Success 🎉");
$("#yeah").html("<%= j render partial: 'yeah',
locals: { cool: @cool } %>");
}
else {
console.log("Sad noises");
}

<% if you_feel_lucky %>
console.log("You are lucky 🍀");
<% end %>
Loading

0 comments on commit 3583c88

Please sign in to comment.