Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🦁

Takuto Wada twada

💭
🦁
View GitHub Profile
View 1 test_helper.js
exports = module.exports = global;
var path = require('path');
QUnit = require(path.join(path.dirname(require.resolve('qunit-tap')), '..', 'vendor', 'qunit', 'qunit', 'qunit')).QUnit;
require("qunit-tap").qunitTap(QUnit, require("sys").puts, { noPlan: true });
QUnit.init();
QUnit.config.updateRate = 0;
exports.assert = QUnit;
@twada
twada / jojo_rush_formatter.rb
Created May 11, 2011
突き(ラッシュ)の速さ比べ
View jojo_rush_formatter.rb
require 'spec/runner/formatter/progress_bar_formatter'
class JojoRushFormatter < Spec::Runner::Formatter::ProgressBarFormatter
def example_failed(example, counter, failure)
@output.print colorize_failure('無駄', failure)
@output.flush
end
def example_passed(example)
@output.print green('オラ')
@output.flush
@twada
twada / shibuya-el-position-paper.md
Created Sep 6, 2012 — forked from ainame/shibuya-el-position-paper.md
shibuya.elのポジションペーパーです。githubアカウントをお持ちの方はforkしてお使いください。
View shibuya-el-position-paper.md

Shibuya.el#1 ポジションペーパー

Personal

@twada
twada / gulpfile.js
Last active Jan 31, 2016
espower-coffee を使ってコード生成を経ずに (gulp-espower を使わずに) CoffeeScript + power-assert を使うデモ (npm test でも gulp test でも動きます)
View gulpfile.js
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('test', function () {
require('espower-coffee/guess');
return gulp
.src('test/**/*.coffee')
.pipe(mocha());
});
@twada
twada / .babelrc
Last active Apr 14, 2016
power-assert in development, unassert in production
View .babelrc
{
"env": {
"development": {
"presets": [
"babel-preset-power-assert"
]
},
"production": {
"plugins": [
"babel-plugin-unassert"
@twada
twada / babel.config.js
Last active Jan 15, 2019
example: unassert but preserve comments
View babel.config.js
module.exports = function (api) {
const presets = [];
const plugins = [];
let retainLines = false;
let comments = true;
if (api.env('production')) {
plugins.push('babel-plugin-unassert');
retainLines = true;
}