User Guide

Install

  1. and unzip.

  2. Open demo.html to see running

Define new specification

  1. Create new HTML something like following:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>JSSpec results</title>
    <link rel="stylesheet" type="text/css" href="JSSpec.css" />
    <script type="text/javascript" src="diff_match_patch.js"></script>
    <script type="text/javascript" src="JSSpec.js"></script>
    <script type="text/javascript">// <![CDATA[
    
    // Your spec goes here
    
    // ]]></script>
    </head>
    <body></body>
    </html>
    
  2. Copy JSSpec.css, diff_match_patch.js and JSSpec.js into same directory

  3. Write your first spec:
    <script type="text/javascript">// <![CDATA[
    
    describe('Plus operation', {
        'should concatenate two strings': function() {
            value_of("Hello " + "World").should_be("Hello World");
        },
        'should add two numbers': function() {
            value_of(1 + 2).should_be(3);
        }
    })
    
    // ]]></script>
    
  4. Congratulations! You've just made specification for Javascript "+" operator.

Run and See

  1. Open your HTML to see your specification running
  2. That's it. For more information, please see

AlansWiki: JSSpec/UserGuide (last edited 2008-04-07 06:34:52 by )