データベースを使った機能テストや単体テストについて要点をまとめておきます。
筆者の経験を強く反映していますので比較的定性的な内容となります事を予めご了承下さい。
テストの実行前に投入するテストデータは、凡そcsvファイルやxmlファイル、エクセルファイル等で管理する事になります。
仕様の変更に伴いテーブルの定義を変更する事で、それらのファイルの内容とデータベースの間に不整合が発生します。
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
(function(){ | |
jQuery.fn.__init = jQuery.fn.init; | |
var old_expr = /^(?:[^<]*(<[\w\W]+>)[^>]*$)/; | |
var strict_expr = /^\s*</; | |
jQuery.fn.init = function(selector, context, rootjQuery){ | |
if (typeof selector === "string") { | |
// console.log(selector); | |
if (old_expr.test(selector) && !strict_expr.test(selector)) { | |
throw 'Syntax error, html string must start with "<"'; | |
} |
NAME "ARIB-B24-SI" | |
ENCODING "ISO2022" | |
# ARIB TR-B14 | |
# G0 KANJI | |
# G1 EISU | |
# G2 HIRAKANA | |
# G3 KATAKANA | |
# VARIABLE "8BIT MAX3 INIT0=94$9 0=94B 0=94J 0=940 0=941 0=94I 0=94$B 0=94$9 0=94$: 0=94$; INIT1=94I 1=94B 1=94J 1=940 1=941 1=94I 1=94$B 1=94$9 1=94$: 1=94$; INIT2=940 2=94B 2=94J 2=940 2=941 2=94I 2=94$B 2=94$9 2=94$: 2=94$; INIT3=941 3=94B 3=94J 3=940 3=941 3=94I 3=94$B 3=94$9 3=94$: 3=94$; NOOLD LS0 LS1 LS2 LS2 LS1R LS2R LS3R SS2 SS3" | |
VARIABLE "8BIT MAX3 INIT0=94$9 INIT1=94J INIT2=940 INIT3=941 NOOLD LS0 LS1 LS2 LS2 LS1R LS2R LS3R SS2 SS3 ARIB-B24" | |
DEFCSID "ISO646-US" 0 |
<?php | |
define("RDIR", (isset($_SERVER["HTTPS"]) ? "http://" : "https://") . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "?t"); | |
header("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Headers: x-prototype-version,x-requested-with"); | |
if(isset($_GET["r"])){ | |
header("Location: " . RDIR); | |
exit(); | |
} |
(function () { | |
var apply = Function.prototype.apply; | |
var flatten = apply.bind(Array.prototype.concat, []); | |
Array.prototype.selectMany = function (fn) { | |
return flatten(this.map(fn)); | |
}; | |
}()); | |
// usage |
List of features that are supported by Opera 12 but not by Opera 15 due to the switch to Blink/Chromium:
xhr.responseType = 'json'
Link
HTTP headerLink
HTTP header for stylesheets specificallyEnter
when an element with tabindex
has focus should trigger a clickdata:
URIs should be handled correctlyfoo.svg
is an SVG file that contains text looks terrible](https://code.google.com/p/chromium/issues/detail?id=33People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
AGQR の放送を保存するスクリプト.
というバグが存在する.
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5