Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1209

Track and compile tests in webpack

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/rricard/tests-in-webpack into master Dec 08, 2016
  • Overview 14
  • Commits 6
  • Pipelines 0
  • Changes 4

Created by: rricard

Should fix #1169 (closed).

1__yarn_start__node_ react_app

Why would I do that?

Right now CRA checks lint (and soon flow) errors through a webpack compilation process (for example, eslint checks are based on a loader). The issue with this is, this will not check non-imported files in the main app such as tests.

How does this PR solves the problem?

This PR adds files matching a certain "glob" pattern (representing the tests) to the list of watched webpack files as well as triggering an independent child compilation (like html-webpack-plugin does) for those files that will open and process the contents of the files through the available loaders (including eslint) to output them in a tmp dir.

Shouldn't we add this to the test script?

Doing so would require to add a new way to run eslint on top of the jest watcher. I don't even know if that's possible, however webpack plugins are perfect for this kind of thing!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rricard/tests-in-webpack