test runner transformation
See original GitHub issueAnother idea that lends itself well to Preact’s vnode abstraction is a super easy way to create frontend integration tests.
You could have something like this:
index.js:
const App = module.exports = (props) => {
<div class="App">
<button class="login" onClick={onClick}>Click Me!</button>
</div>
}
test.js:
// This would walk the vnodes, and build a selector list along with their handlers
let $ = Runner(require('./app')(testProps))
// query the selector list and then trigger the handler
$('.login').click(e) // optional "e" that you could pass through
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Testing Transformation: A viable option for all companies
An intuitive dashboard provides a comprehensive management framework with a focus on test metrics and business priorities. An effective model spells out a...
Read more >Running the Transformation Test Utility - Oracle Help Center
Running the Transformation Test Utility ; Source Node. Enter the name of the node whose codeset group defines the structure of the input...
Read more >How to test a transformation in Palantir Foundry?
We try to create a test function for the whole transformation. import os from transforms.verbs.testing.TransformRunner import ...
Read more >Web Test Runner
Test runner for web applications. ... npm i --save-dev @web/test-runner ... Transform JS to a compatible syntax based on user agent: web-test-runner ......
Read more >Testing Transformation to 'Beyond Testing' - Capgemini
including a Managed Testing Service (MTS). This has proved to be a robust and effective model for structuring and running a test organization,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@matthewmueller yes!! This is similar to enzyme, just lighter. Super high on my to-do list! That was actually why I wrote undom, as the faked rendering target that can still be queried and asserted on like a DOM.
If anyone stumbles upon this issue, we have great guide on how to use
preact
withenzyme
on our main site: https://preactjs.com/guide/unit-testing-with-enzyme