Writing Bubble Tea Tests
Learn how to use x/exp/teatest to write tests for your Bubble Tea apps.
I’ve lost a considerable amount of time trying to bind those things together, so I decided to write this quick post about it, so others could also benefit from it.
The tips are:
go get. Use
circle.yml would look like this:
machine: environment: IMPORT_PATH: "/home/ubuntu/.go_workspace/src/github.com/myuser" APP_PATH: "$IMPORT_PATH/myproject" dependencies: override: - sudo add-apt-repository ppa:masterminds/glide -y - sudo apt-get update - sudo apt-get install glide -y test: pre: - mkdir -p "$IMPORT_PATH" - ln -sf "$(pwd)" "$APP_PATH" - cd "$APP_PATH" && glide install override: - cd "$APP_PATH" && go test -cover $(glide nv)
myproject to the username and repository name of your project on github.
There is probably some easy way to make this work, but I coulnd’t find it.