How to use:
Inside your mocha's test file:
const createSinonSandbox = require('./sinon-sandbox.js');
describe('...', ()=> {
createSinonSandbox((sandbox)=> {
sandbox.spy(...);
var gulp = require('gulp'), | |
source = require('vinyl-source-stream'), | |
browserify = require('browserify'), | |
babelify = require('babelify'), | |
gulpLiveReload = require('gulp-livereload'); | |
gulp.task('scripts', function () { | |
//noinspection JSUnresolvedFunction | |
return browserify('src/main.js', {debug: true}) // browserify entry file |
var gulp = require('gulp'), | |
source = require('vinyl-source-stream'), | |
browserify = require('browserify'), | |
babelify = require('babelify'), | |
watchify = require('watchify'), | |
livereload = require('gulp-livereload'); | |
var bundlePaths = { | |
src: { | |
js: [ |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
function myParseInt(str) { | |
return /^\s*\d+\s*$/.test(str) ? +str : NaN; | |
} |
'use strict'; | |
/*! jQuery v2.2.0 | (c) jQuery Foundation | jquery.org/license */ | |
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}) |
function owenCRC16(packet, length){ | |
var i, j; | |
var crc; | |
crc = 0; | |
for (i = 0; i < length; i++) | |
{ | |
var b = packet[i]; | |
for (j = 0; j < 8; j++) | |
{ |
How to use:
Inside your mocha's test file:
const createSinonSandbox = require('./sinon-sandbox.js');
describe('...', ()=> {
createSinonSandbox((sandbox)=> {
sandbox.spy(...);
<!-- тест судьи --> | |
- | |
<div class="test_judge"><button class="test_judge__start t__button t__button_status_active">Играть</button></div> | |
<script src="/js/test.js" defer=""></script> | |
- | |
<!-- тест танакана --> | |
- | |
<div class="test_judge tanakan"><button class="test_judge__start t__button t__button_status_active">Играть</button></div> | |
<script src="/js/tanakan.js" defer=""></script> |
console.log('123444444444') |
wget -qO- https://gist.githubusercontent.com/wailorman/e49552b520344af40fd75b2d5df2d05a/raw/8a45ebc02d6a0a9c256667e167c3279ed2b68db8/install.sh | bash