This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>hello React</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="app"> | |
<!-- my app renders here --> | |
</div> |
This file contains hidden or 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
exports.config = { | |
framework: 'mocha', | |
specs: [ | |
'test/e2e/**/*.spec.js' | |
], | |
mochaOpts: { | |
enableTimeouts: false // Necessary to avoid timeout bugs with Mocha that sometimes happen while using Protractor. May already be resolved. | |
} | |
} |
This file contains hidden or 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
# convert search test to use the Test::Unit framework | |
require 'rubygems' | |
require 'selenium-webdriver' | |
require 'test/unit' # pull in the gem | |
class CheeseFinderTests < Test::Unit::TestCase # declare new class | |
def test_find_some_cheese # create new method that has all the test code | |
selenium = Selenium::WebDriver.for(:firefox) |
This file contains hidden or 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
{ | |
"scripts": { | |
"postinstall": "./node_modules/.bin/wiredep -s index.html" | |
} | |
} |
This file contains hidden or 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
<h2>Test 16 columns</h2> | |
<div class="row"> | |
<div class="col-md-1 red">Col 1</div> | |
<div class="col-md-1 red">Col 2</div> | |
<div class="col-md-1 red">Col 3</div> | |
<div class="col-md-1 red">Col 4</div> | |
<div class="col-md-1 red">Col 5</div> | |
<div class="col-md-1 red">Col 6</div> | |
<div class="col-md-1 red">Col 7</div> |
This file contains hidden or 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
angular.module('myModule', [ ], function($rootScope){ // equivalent to .config(function($rootScope){ . . . }) | |
$rootScope._ = _; // Make `_` available in Angular Expressions | |
}).controller('MyController', function(Something){ | |
var saveSomething = this.saveSomething = Something.save(); | |
$scope.$watch('something', _.debounce(saveSomething, 500)); | |
$scope.something = 'some value'; | |
}) | |
; // END myModule |
This file contains hidden or 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 assert = require('assert'); | |
function test(actual, expected, success){ | |
success = success || 'pass!'; | |
assert.equal(actual, expected); | |
console.log(success); | |
} |
This file contains hidden or 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 assert = require('assert'); | |
function test(actual, expected, success){ | |
success = success || 'pass!'; | |
assert(actual === expected) || console.log(success); | |
} | |
/** | |
* Check Writing |
NewerOlder