Try it live: https://swarooph.github.io/cantest/
Unofficial local study tool based on IRCC’s Discover Canada guide. Pick any province or territory for capital/region questions (default: British Columbia).
This is not an official IRCC test. Only the Discover Canada study guide is authoritative.
- Province/territory picker: filters local capital/region questions; saved in
localStorage - Mock exam: 20 questions, 30-minute timer, pass at 15/20; stratified chapter mix with ≥1 local/regions question
- Practice by chapter: untimed, immediate feedback and source links
- Review: per-question explanations after submit
- 160+ MCQs grounded in scraped guide content (includes the 3 official study-guide MCQs)
npm install
npm run devOpen the URL Vite prints (usually http://localhost:5173).
Configured for https://swarooph.github.io/cantest/ (base: '/cantest/' in Vite; workflow on master).
- Push these changes to GitHub.
- In the repo: Settings → Pages → Build and deployment → Source → GitHub Actions.
- Push to
master(or run the Deploy static content to Pages workflow manually). - Site URL after a green Actions run: https://swarooph.github.io/cantest/
| Command | Description |
|---|---|
npm run dev |
Start the app |
npm run build |
Production build |
npm run scrape |
Re-fetch Discover Canada chapters into data/guide/ |
npm run smoke |
Quick checks for bank size, sampling, pass threshold |
npm run scrapewrites structured JSON underdata/guide/data/questions.jsonis the curated MCQ bank (answers checked against the corpus)- The Vite app imports the question bank at build time
- 20 questions
- 30 minutes
- Pass: 15/20 (75%)
Two different things live in this repo, under two different terms:
- Code (
src/,scripts/, config) — MIT, © 2026 Swaroop Hegde. See LICENSE. - Study content (
data/questions.json,data/guide/) — adapted from Discover Canada, © His Majesty the King in Right of Canada, as represented by the Minister of Immigration, Refugees and Citizenship Canada. Reproduced for non-commercial use. See NOTICE.
The MIT grant covers the code only; it does not extend to the Discover Canada material. This is not an official version of that material and is not endorsed by the Government of Canada.