Comments (6)
Hey @felixjb I'm looking into this a bit and am working on the following approach
(pseudo code)
const { runnerHints, testNames } = parse(testFile)
const runner = findRunnerUp(testFile, runnerHints)
const testRoot = findPkgUp(testFile, runner.name)
runner.runTest({ cwd: testRoot, testFile, testNames })
The big difference being, the cwd of the runner command is set to the nearest package.json directory to the test file, that contains that runner. I can also work on moving runner command generation to a factory function and generalize the runTest,debugTest implementation.
from testify.
Medium: monorepo development with multi root workspaces in vsc
Extension: Monorepo to workspace config
from testify.
Hello @calebboyd !
This feature would really be a great addition to the project. The way it works today is:
- the extension looks for the test ruuner in the node_modules directory in the root of the workspace; or
- the extension looks for the test ruuner at the path you specified in the configurations;
I am trying to figure out a new method write a factory for this so it can be a little more flexible but couldn't find a way yet. I'll make this issue with help wanted
from testify.
Hey @calebboyd , thank you for picking this up.
That package.json idea is pretty cool. Maybe you could also base your implementation on how Git handles the commits in a repository, which seems similar
from testify.
Should this not work out of the box when using workspaces?
from testify.
@roggenbrot I don't know, maybe not. Some projects use a monorepo structure, some even use a framework called lerna which makes one repo have multiple package.json files
from testify.
Related Issues (20)
- Path is not used HOT 1
- "No test runner in your project. Please install one." error HOT 1
- No test runner in your project. Please install one. HOT 5
- Fix Enzyme Internal Error HOT 2
- Test file watchers that triggers edited tests HOT 1
- Regexp .test method triggers adding the "Run Test | Debug Test" HOT 3
- Keybindings to run tests
- Add codelens near context keyword
- there is a undefined in grep HOT 5
- Backslashes used for path to jest bin. Causes bad path when using Git Bash terminal on Windows HOT 3
- This experimental syntax requires enabling the parser plugin: 'optionalChaining' (55:12) HOT 1
- Babel's typescript transpilation options HOT 1
- Incorrectly identifies identifier with name "it" as a test HOT 2
- Support for jest-each HOT 1
- Support playwright test runner HOT 1
- Double quotes should be escaped from the command HOT 1
- Playwright test debug fails with error HOT 7
- Recognize test tokens without requiring a string literal HOT 11
- The automated release is failing 🚨 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testify.