Skip to content

Latest commit

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

gopher-jasmine

A runtime-available jasmine inspired acceptance test framework for golang.

Quick Start

Create A Suite and Serve

The following example creates a suite called parent suite which has one test should run one top level test and one child suite first child suite. The child suite has one test should run one child test. The structure is more easily represented in the following way.

  • parent suite
    • should run one top level test
    • first child suite
      • should run one child test

This suite is served at localhost:9091.

package main
import (
"github.com/hyperstripe50/gopher-jasmine/suite""github.com/hyperstripe50/gopher-jasmine/api"
)
funcmain() {
s:=suite.NewSequentialSuite("parent suite").
It("should run one top level test", func(instancemap[string]interface{}) error {
returnnil
}).
Describe(suite.NewSequentialSuite("first child suite").
It("should run one child test", func(instancemap[string]interface{}) error {
returnnil
}),
)
api.NewApi([]suite.Suite{s}).ListenAndServe(":9091")
}

Run the Suite

All available API endpoints are listed at localhost:9091.

To trigger the parent suite navigate to localhost:9091/parent-suite.

About

A runtime-available jasmine inspired acceptance test framework for golang.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages