Skip to content

Commit

Permalink
Add in astro check
Browse files Browse the repository at this point in the history
  • Loading branch information
markgaze committed Apr 11, 2024
1 parent 2815c37 commit 5281b32
Show file tree
Hide file tree
Showing 6 changed files with 382 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
module.exports = (on) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on("task", {
Expand Down
3 changes: 2 additions & 1 deletion cypress/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import * as axe from "axe-core";
import "cypress-axe";
import "./commands";

Expand All @@ -23,7 +24,7 @@ import "./commands";
/**
* @param violations
*/
export function terminalLog(violations: { description: any; id: any; impact: any; nodes: any }[]) {
export function terminalLog(violations: axe.Result[]) {
cy.task(
"log",
`${violations.length} accessibility violation${violations.length === 1 ? "" : "s"} ${
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "astro dev",
"start": "astro preview --host",
"build": "astro build",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"format": "prettier --plugin=prettier-plugin-astro --write .",
Expand All @@ -16,6 +16,7 @@
"test": "echo \"No tests at this time\" && exit 0"
},
"devDependencies": {
"@astrojs/check": "^0.5.10",
"@astrojs/mdx": "^2.1.1",
"@astrojs/svelte": "^5.0.3",
"@iconify/json": "^2.2.182",
Expand Down
Loading

0 comments on commit 5281b32

Please sign in to comment.