Coder Social home page Coder Social logo

digideskio / moksi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from manfred/moksi

0.0 0.0 0.0 387 KB

Moksi is an all-in-one JavaScript testing framework with a lot of salt, but easy on the pepper.

License: MIT License

Ruby 1.55% JavaScript 93.12% HTML 3.82% CSS 1.51%

moksi's Introduction

Moksi

Moksi is an all-in-one JavaScript testing framework with a lot of salt, but easy on the pepper. With Moksi you write tests which are terse and readable.

A taste

var Person = Class.create({
  initialize: function(name, mood) {
    this._name = name;
  },
  
  name: function() {
    return this._name;
  },

  toBlurb: function() {
    return this.name() + ' is a ' + mood + ' person.';
  }
});

Moksi.describe('Person', {
  setup: function() {
    this.suite.person = new Person('Alice', 'happy');
  },

  'describes itself in a blurb': function() {
    expects(this.suite.person.toBlurb()).equals('Alice is a happy person.');
  },
  
  'includes the name in the blurb': function() {
    expects(this.suite.person).receives('name', { times: 1 });
    this.suite.person.toBlurb();
  }
});

Copyright © 2009, Manfred Stienstra [email protected]

moksi's People

Contributors

kurowski avatar manfred 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.