Giter VIP home page Giter VIP logo

Comments (3)

myitcv avatar myitcv commented on May 29, 2024

@breml good question.

gopherjs test uses the Node environment; hence the window global is not available.

For this reason I wrote (the very basic) myitcv.io/gjbt which enables you to run tests within a headless Chrome instance.

The myitcv.io/react tests themselves use this approach.

Skeleton tests for all of the generated elements are themselves also generated in case you need any inspiration, e.g. the <a> element tests.

Let me know how you get on.

from react.

breml avatar breml commented on May 29, 2024

@myitcv I tried gjbt, but this does not yet look clean to me.

I installed chromedriver, added the init_test.go file as suggested and run gjbt .. I then get this output:

ok  	github.com/breml/reacttest/test	0.046s
panic: failed to retrieve logs: unexpected response: {"sessionId":"a6fa970438e2285d182fe582c707e7a2","status":6,"value":{"message":"no such session\n  (Driver info: chromedriver=2.9.248304,platform=Linux 4.4.0-122-generic x86_64)"}}

goroutine 1 [running]:
main.main()
	/home/lubr/code/go/src/github.com/myitcv/gjbt/main.go:163 +0xe8b

It looks like the test have been executed (and are successful), but I still get the above mentioned panic. Do you have an idea why this happens?

from react.

myitcv avatar myitcv commented on May 29, 2024

@breml there have been a few more commits recently to gjbt (as well as some improve documentation) which probably fix the issue you've seen. Please can you give it another try?

In particular, the README now lists requirements:

https://github.com/myitcv/gjbt

from react.

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.