View ModuleTemplate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
"use strict"; | |
// --- Define ---------------------------------------------- | |
// platform detection | |
var _BROWSER = !!global.self; | |
var _WORKER = !!global.WorkerLocation; | |
var _NODE_JS = !!global.process; | |
// --- Private class variables ----------------------------- |
View callbackTypeDef.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface callbackType{(argv :number) :void}; | |
function func(callback:callbackType){ | |
... | |
} |
View TestWithMocha.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var should = require('chai').should(); | |
describe('Hogeのテスト', function(){ | |
describe('Hoge.method1() のテスト', function(){ | |
it('条件1', function(done){ | |
done(); | |
}); | |
it('条件2', function(done){ | |
done(); |
View mocha.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/mocha/1.13.0/mocha.css" rel="stylesheet"/> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/mocha/1.13.0/mocha.js" type="text/javascript"></script> | |
<script src="http://chaijs.com/chai.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
mocha.setup('bdd'); | |
window.onload = mocha.run; | |
var should = chai.should(); |