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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Redux = require('redux'); | |
var ReactRedux = require('react-redux'); | |
function counter(state = 0, action) { | |
switch (action.type) { | |
case 'INCREMENT': | |
return state + 1 | |
case 'DECREMENT': |
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
import $ from 'jquery'; | |
import Backbone from 'backbone'; | |
export var ajaxSpy; | |
export default function spyAjax() { | |
var deferreds; | |
beforeEach(function() { | |
deferreds = []; | |
ajaxSpy = spyOn(Backbone, 'ajax').and.callFake(({success, error}) => { |
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
{ | |
"name": "mocha-allure-16", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"prepublish": "selenium-standalone install", | |
"pretest": "rm -rf allure-results", | |
"test": "multi='progress=- mocha-allure-reporter=-' mocha test.js --reporter mocha-multi --timeout 30000", | |
"report": "allure generate allure-results" |
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
{ | |
"name": "postcss-bug", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", |
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
node_modules/ | |
dist/ |
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
const fs = require('fs'); | |
const path = require('path'); | |
const Handlebars = require('handlebars/dist/cjs/handlebars'); | |
// configuration the same as webpack handlebars-loader has | |
const config = { | |
helperDirs: [ | |
path.resolve(__dirname, '../src/helpers'), | |
path.resolve(__dirname, '../src/blocks') | |
] |
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 jasmine = new Jasmine(); | |
jasmine.loadConfig({ | |
spec_dir: 'src', | |
spec_files: [ | |
'js/**/*.spec.js' | |
], | |
helpers: ['spec/bootstrap.js'] | |
}); | |
jasmine.onComplete(function(passed) { | |
done(passed ? null : 'Some tests has been failed'); |
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
"use strict"; | |
class Queue { | |
constructor() { | |
this.top = Promise.resolve(); | |
} | |
push(operation) { | |
return this.top = this.top | |
.then(() => this.delay()) | |
.then(() => operation()); |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
"use strict"; | |
function SearchBox(selector) { | |
this.selector = selector || ".search2"; | |
this.input = this.selector + " [name=text]"; | |
this.submitButton = this.selector + " [type=submit]"; | |
} | |
module.exports = new SearchBox(); |