GithubHelp home page GithubHelp logo

miragejs / tutorial Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 24.0 1.82 MB

The Reminders app for the official Mirage tutorial

Home Page: https://mirage-tutorial.now.sh

License: MIT License

JavaScript 94.29% HTML 5.71%

tutorial's Introduction

Mirage JS

npm version example workflow

A client-side server to develop, test and prototype your JavaScript app.

Documentation

Visit miragejs.com to read the docs.

tutorial's People

Contributors

samselikoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tutorial's Issues

Potential switch to vite.

The tutorial app doesn't start.

I recently came across mirage while looking to mock some backend apis. In a bid to learn it, I navigated to the tutorial section.

I cloned the tutorial and attempted to start it using yarn. Unfortunately, the app refuses to start. It leads to this error:
I've tested it on Windows 11 and macOS Monterey.

Node version: 18.12.1

image

It would help if this project is moved to vite which could potentially solve this error.

why Vite

The React team has deprecated CRA and in the new docs, vite is recommended as a way to bootstrap new react projects.

It would help onboard new devs into the amazing tool that Mirage is.

Please add a license to this repo

Looks like MirageJS code and website are both under the MIT license; however, this tutorial repository doesn't have a license specified, so it's unclear under what license this code is provided and under what license contributions are accepted.

Could you please clarify that by adding a LICENSE file to this repo?

Thanks!

[STEP-9] TypeError: MutationObserver is not a constructor

I've tried to update outdated packages but it does not solved the problem

LOG

FAIL  src/tests/app.js
  ✕ it shows a message when there are no reminders (67ms)

  ● it shows a message when there are no reminders

    TypeError: MutationObserver is not a constructor

      12 |     visit("/")
    > 13 |     await waitForElementToBeRemoved(() => screen.getByText("Loading..."))
         |           ^
      14 | 
      15 |     expect(screen.getByText("All done!")).toBeInTheDocument()
      16 |   })

      at node_modules/@testing-library/dom/dist/wait-for.js:79:18
      at waitFor (node_modules/@testing-library/dom/dist/wait-for.js:42:10)
      at node_modules/@testing-library/dom/dist/wait-for.js:135:54
      at node_modules/@testing-library/react/dist/pure.js:58:22
      at node_modules/@testing-library/react/dist/act-compat.js:60:24
      at batchedUpdates$1 (node_modules/react-dom/cjs/react-dom.development.js:21856:12)
      at act (node_modules/react-dom/cjs/react-dom-test-utils.development.js:929:14)
      at node_modules/@testing-library/react/dist/act-compat.js:59:20
      at asyncAct (node_modules/@testing-library/react/dist/act-compat.js:38:14)
      at Object.asyncWrapper (node_modules/@testing-library/react/dist/pure.js:57:35)
      at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:135:35)
      at waitForElementToBeRemoved (node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js:39:31)
      at Object.<anonymous> (src/tests/app.js:13:11)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        1.8s, estimated 2s
Ran all test suites.

Watch Usage: Press w to show more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.