Coder Social home page Coder Social logo

Comments (2)

auvred avatar auvred commented on June 12, 2024

I'm +1 on adding some docs about snapshots and how to deal with them! In addition to ESLint output snapshots, we have rule schema snapshots. It would be nice to mention them as well.

https://github.com/typescript-eslint/typescript-eslint/tree/4858afde147a5ff6fa20ac1e73bc1c04692cef7a/packages/eslint-plugin/tests/schema-snapshots


Btw, we can also explain how to work with ast-spec snapshots. This may seem non-trivial!
There is a great explanation from Brad: #7649 (comment) 👍

  • within this folder create a folder called fixtures.

  • within fixtures create a _error_ folder

  • within _error_ create a folder with a name for your case - for example maybe using-initializer?

  • within that folder, create a file called fixture.ts

  • within that file add your test code (eg for(using foo in {});)

  • cd packages/ast-spec && yarn test to run the fixture tests and generate the necessary snapshots.

from typescript-eslint.

JoshuaKGoldberg avatar JoshuaKGoldberg commented on June 12, 2024

Yeah I cd eslint-plugin; yarn test schemas -u to update snapshots. +1 to docs

from typescript-eslint.

Related Issues (20)

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.