Skip to content

A personal adventure into new technologies, dev and testing

Notifications You must be signed in to change notification settings

donnajharris/tic-tac-toe-improvement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using @robrich's test code (https://github.com/robrich/web-test-everything) and @bornasepic's tic-tac-toe application code (https://github.com/BornaSepic/Tic-Tac-Toe) to learn about a flurry of things all at once, including but not limited to:

  • JS Web Development
  • Testing JS
  • Typescript
  • Vue

Original readme.md

Scaling the Testing Pyramid in JavaScript

Build and Test

This is the companion code to the talk at https://robrich.org/slides/web-test-all-the-things/

In this talk we look at testing TypeScript Web Apps (PWA / SPA). We examine tests in these categories:

  • hello testing typescript
  • unit test a function
    • without mocks
    • mock dependencies
    • mock parameters
  • unit test a component
    • assert rendering
    • assert behaviors
  • integration testing (from here down)
  • external API validation
  • end-to-end UI tests
    • custom commands
    • mock network requests
  • smoke tests

We explore these NPM packages:

Usage

Run the website:

  1. Start redis in docker by running docker-compose up

  2. Start api by running this from a terminal:

    cd api
    npm install
    npm start
  3. Start the vue app by running this from a terminal:

    cd app
    npm install
    npm run serve

Run all the tests:

  1. Start redis in docker by running docker-compose up

  2. Don't start the app or api, and kill them if they're running

  3. From a terminal run this:

    cd api
    npm run test
    cd ..
    cd app
    npm run test
    cd ..

See also the GitHub Actions build file in .github/workflows/build-and-test.yaml

License

MIT

About

A personal adventure into new technologies, dev and testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published