Giter VIP home page Giter VIP logo

jasmineprimenumbertest's Introduction

<<<<<<< HEAD Simple example of jasmine. I ran jasmine examples and fixed the paths so the tests work. I also added src/Add.js and spec/my_examples/AddSpec.js.

Setup

  • npm install to install the jasmine cli runner
  • ./node_modules/jasmine/bin/jasmine to run tests

Getting started with Jasmine on another project

  1. get jasmine via npm install -g jasmine or just with the local project with npm install --save-dev jasmine. In that case jasmine will be in ./node_modules/jasmine/bin/jasmine.js
  • If you don't have a package.json you might want to npm init before installing locally so the jasmine requirement gets saved to your manifest
  • If installing locally you should probably add node_modules to .gitignore
  1. Are you testing only commonjs modules?
  • jasmine init to set up a spec folder and basic config for commonjs testing
  • create a WhateverSpec.js in the spec folder. You can also organize specs into any depth of folders under spec. Fill the test with a jasmine test suite.
  • the test should use the require() function to assign a commonjs module to a variable.
  • jasmine from project root to run tests
  1. Or are you testing some other non-commonjs javascript?
  • I think you'll need a SpecRunner.html to include your dependencies in script tags in order. It needs a bunch of other boilerplate too.
  • Download the standalone version and unzip it into a jasmine folder. Or just copy/paste this: mkdir jasmine && wget -O ./jasmine/jasmine.zip https://github.com/jasmine/jasmine/releases/download/v2.1.3/jasmine-standalone-2.1.3.zip && cd jasmine && unzip jasmine.zip && rm -f jasmine.zip && cd ..
  • create a WhateverSpec.js in the jasmine/spec folder. You can also organize specs into any depth of folders under spec. Fill the test with a jasmine test suite.
  • open the SpecRunner.html in your browser
  • you can also use jasmine-html-runner to run it on the command line =======

AndelaBootCampDayZero

getPrimes function that takes an integer value n as argument and generates prime numbers from 0 to n with asymptotic analysis.

3c7dab073039e7c515482ed7c21757f694881699

jasmineprimenumbertest's People

Contributors

ludralph avatar

Watchers

James Cloos avatar  avatar

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.