|
| 1 | +import { defineConfig } from "astro/config"; |
| 2 | +import starlight from "@astrojs/starlight"; |
| 3 | + |
| 4 | +export default defineConfig({ |
| 5 | + // For now, this is only being deployed to mocha-docs-next.netlify.app. |
| 6 | + // Soon we'll move it onto mochajs.org/next. |
| 7 | + ...(!process.env.NETLIFY_BUILD_BASE && { base: "/next" }), |
| 8 | + integrations: [ |
| 9 | + starlight({ |
| 10 | + components: { |
| 11 | + Footer: "./src/components/Footer.astro", |
| 12 | + Head: "./src/components/Head.astro", |
| 13 | + PageTitle: "./src/components/PageTitle.astro", |
| 14 | + }, |
| 15 | + customCss: ["./src/style/custom.css"], |
| 16 | + logo: { |
| 17 | + dark: "./src/components/icon-dark.svg", |
| 18 | + light: "./src/components/icon-light.svg", |
| 19 | + }, |
| 20 | + sidebar: [ |
| 21 | + { label: "Getting Started", slug: "getting-started" }, |
| 22 | + { |
| 23 | + items: [ |
| 24 | + { label: "CLI", slug: "running/cli" }, |
| 25 | + { label: "Configuring", slug: "running/configuring" }, |
| 26 | + { label: "Editor plugins", slug: "running/editor-plugins" }, |
| 27 | + { label: "Browsers", slug: "running/browsers" }, |
| 28 | + { label: "Test globs", slug: "running/test-globs" }, |
| 29 | + ], |
| 30 | + label: "Running Mocha", |
| 31 | + }, |
| 32 | + { |
| 33 | + items: [ |
| 34 | + { label: "Dynamic tests", slug: "declaring/dynamic-tests" }, |
| 35 | + { label: "Exclusive tests", slug: "declaring/exclusive-tests" }, |
| 36 | + { label: "Inclusive tests", slug: "declaring/inclusive-tests" }, |
| 37 | + { label: "Pending tests", slug: "declaring/pending-tests" }, |
| 38 | + { label: "Retrying tests", slug: "declaring/retrying-tests" }, |
| 39 | + ], |
| 40 | + label: "Declaring Tests", |
| 41 | + }, |
| 42 | + { |
| 43 | + items: [ |
| 44 | + { label: "Arrow functions", slug: "features/arrow-functions" }, |
| 45 | + { label: "Assertions", slug: "features/assertions" }, |
| 46 | + { label: "Asynchronous code", slug: "features/asynchronous-code" }, |
| 47 | + { label: "Error codes", slug: "features/error-codes" }, |
| 48 | + { label: "Global fixtures", slug: "features/global-fixtures" }, |
| 49 | + { label: "Hooks", slug: "features/hooks" }, |
| 50 | + { label: "Parallel mode", slug: "features/parallel-mode" }, |
| 51 | + { label: "Root hook plugins", slug: "features/root-hook-plugins" }, |
| 52 | + { label: "Timeouts", slug: "features/timeouts" }, |
| 53 | + ], |
| 54 | + label: "Features", |
| 55 | + }, |
| 56 | + { |
| 57 | + collapsed: true, |
| 58 | + items: [ |
| 59 | + { label: "BDD (default)", slug: "interfaces/bdd" }, |
| 60 | + { label: "TDD", slug: "interfaces/tdd" }, |
| 61 | + { label: "Exports", slug: "interfaces/exports" }, |
| 62 | + { label: "QUnit", slug: "interfaces/qunit" }, |
| 63 | + { label: "Require", slug: "interfaces/require" }, |
| 64 | + { label: "Third-Party", slug: "interfaces/third-party" }, |
| 65 | + ], |
| 66 | + label: "Interfaces", |
| 67 | + }, |
| 68 | + { |
| 69 | + collapsed: true, |
| 70 | + items: [ |
| 71 | + { label: "Spec (default)", slug: "reporters/spec" }, |
| 72 | + { label: "Doc", slug: "reporters/doc" }, |
| 73 | + { label: "Dot", slug: "reporters/dot" }, |
| 74 | + { label: "HTML", slug: "reporters/html" }, |
| 75 | + { label: "JSON Stream", slug: "reporters/json-stream" }, |
| 76 | + { label: "JSON", slug: "reporters/json" }, |
| 77 | + { label: "Landing", slug: "reporters/landing" }, |
| 78 | + { label: "List", slug: "reporters/list" }, |
| 79 | + { label: "Markdown", slug: "reporters/markdown" }, |
| 80 | + { label: "Min", slug: "reporters/min" }, |
| 81 | + { label: "Nyan", slug: "reporters/nyan" }, |
| 82 | + { label: "Progress", slug: "reporters/progress" }, |
| 83 | + { label: "Tap", slug: "reporters/tap" }, |
| 84 | + { label: "XUnit", slug: "reporters/xunit" }, |
| 85 | + { label: "Third-Party", slug: "reporters/third-party" }, |
| 86 | + ], |
| 87 | + label: "Reporters", |
| 88 | + }, |
| 89 | + { |
| 90 | + collapsed: true, |
| 91 | + items: [ |
| 92 | + { |
| 93 | + label: "Detecting multiple calls to done()", |
| 94 | + slug: "explainers/detecting-multiple-calls-to-done", |
| 95 | + }, |
| 96 | + { |
| 97 | + label: "Node.js native ESM support", |
| 98 | + slug: "explainers/nodejs-native-esm-support", |
| 99 | + }, |
| 100 | + { |
| 101 | + label: "Run cycle overview", |
| 102 | + slug: "explainers/run-cycle-overview", |
| 103 | + }, |
| 104 | + { label: "Test duration", slug: "explainers/test-duration" }, |
| 105 | + { |
| 106 | + label: "Test fixture decision tree", |
| 107 | + slug: "explainers/test-fixture-decision-tree", |
| 108 | + }, |
| 109 | + ], |
| 110 | + label: "Explainers", |
| 111 | + }, |
| 112 | + { |
| 113 | + label: "API", |
| 114 | + link: "https://mochajs.org/api", |
| 115 | + }, |
| 116 | + ], |
| 117 | + social: { |
| 118 | + discord: "https://discord.gg/KeDn2uXhER", |
| 119 | + github: "https://github.com/mochajs/mocha", |
| 120 | + }, |
| 121 | + title: "Mocha", |
| 122 | + }), |
| 123 | + ], |
| 124 | +}); |
0 commit comments