Code Monkey home page Code Monkey logo

nightmare-jasmine's Introduction

nightmare-jasmine Build Status npm apache2

Jasmine wrapper for Nightmare

Installation

npm install --save-dev nightmare-jasmine

Usage

import { Context as BaseContext, run } from 'nightmare-jasmine'

run({
  params: {
    username: 'foo'
  },
  specFiles: [
    './hooks/beforeAll.js',
    './hooks/beforeEach.js',
    './specs/*.js'
  ]
})

API

run(options: Options)
  .then(() => console.log('Success!'))
  .catch(e => console.error('Error!', e))

Options:

Name Type Required? Description
baseDir string No Directory that spec files should be resolved relative to
isDebug boolean No Show browser?
params Object No Additional params to pass to tests
specFiles string[] Yes Glob array of spec files

Example spec

describe('nightmare-jasmine', () => {
  it('should route to #/foo', async function(this: Context) {
    const url = await this.nightmare.wait('#myElement').evaluate(() => window.location.href)
    expect(url).toBe('http://localhost:4000/#/foo')
  })
})

Usage notes

  • If the process exits due to a Jasmine error, it will stay open for up to 30 secs (or whatever nightmare.options.waitTimeout is set to). This is because nightmare .wait() uses timeouts, which are not cleared when .halt() is called. (see segment-boneyard/nightmare#863)

nightmare-jasmine's People

Contributors

bcherny avatar greenkeeper[bot] avatar hineichris avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

nightmare-jasmine's Issues

An in-range update of @types/node is breaking the build 🚨

Version 8.0.8 of @types/node just got published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.7
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.