Skip to content

Instantly share code, notes, and snippets.

View vojtajina's full-sized avatar

Vojta Jina vojtajina

View GitHub Profile
@vojtajina
vojtajina / checkbox-input-widget.html
Created February 8, 2014 05:39
Angular templating proposal examples
<div class="fancy_checkbox">
<div class="box {{checked}}"></div>
</div>
var chokidar = require('chokidar');
var watcher = new chokidar.FSWatcher({
usePolling: false,
useFsEvents: true,
// changing to false makes it work
ignoreInitial: true,
});
watcher.add('/Users/vojta/Code/karma/test/e2e/basic');
var fs = require('q-io/fs');
var q = require('q');
var ignoreNodeDirectory = function(path) {
return path.indexOf('src/node/') === -1;
};
var EXPORT_REGEXP = /export/g;
@vojtajina
vojtajina / code.js
Last active December 29, 2015 12:09
export class Greeter {
}
@vojtajina
vojtajina / karma.conf.js
Created November 22, 2013 17:28
Karma config helpers example
var served = function(file) {
return {pattern: file, included: false};
};
var included = function(file) {
return {pattern: file, included: true};
};
module.exports = function(config) {
config.set({
@vojtajina
vojtajina / karma.conf.js
Created November 10, 2013 16:58
TinyMCE test
// Karma configuration
// Generated on Wed Nov 06 2013 10:36:01 GMT+0100 (Paris, Madrid)
module.exports = function (config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
if (action.isArray) {
if (!angular.isArray(data)) {
throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected response to contain an array but got an object');
}
value.length = 0;
forEach(data, function(item) {
value.push(new Resource(item));
});
} else {
// DSL - these migt be provided by protractor
// `protractor` is globally provided instance of Provider (connected webdriver instance)
// `protractor.driver` can be the wrapper webdriver instance
var navigateTo = protractor.get;
var element = protractor.getElementByCssSelector;
var button = function(label) {
return protractor.getElementByCssSelector(':button:contains("' + label + '")');
};
// We should provide some syntactic sugar for defining custom helpers.
@vojtajina
vojtajina / webstorm-karma.log
Created July 22, 2013 00:35
/usr/local/nvm/v0.10.2/bin/node "/Applications/WebStorm 7 EAP.app/plugins/js-karma/js_reporter/karma-intellij/lib/intellijRunner.js" --karmaPackageDir=/Users/vojta/Code/angular.dart/node_modules/karma --runnerPort=9101
##teamcity[enteredTheMatrix]
##teamcity[testSuiteStarted nodeId='1' parentNodeId='0' name='karma.conf.js' nodeType='config' locationHint='config:///Users/vojta/Code/angular.dart/karma.conf.js']
##teamcity[testSuiteStarted nodeId='2' parentNodeId='1' name='Chrome 29.0.1530 (Mac OS X 10.8.4)' nodeType='browser']
##teamcity[testCount count='307']
##teamcity[testStarted nodeId='3' parentNodeId='2' name='MockHttp should replay an http request' nodeType='test' locationHint='test://MockHttp should replay an http request']
##teamcity[testFinished nodeId='3' duration='5']
##teamcity[testStarted nodeId='4' parentNodeId='2' name='MockHttp should replay an http request which is expected multiple times' nodeType='test' locationHint='test://MockHttp should replay an http request which is expected multiple times']
##teamcity[testFinished nodeId='4' duration='1']
##teamcity[testStarted nodeId='5' parentNodeId='2' name='MockHttp should throw an exeception on assertAllGetsCalled when not all expected GETs were called' nodeType
@vojtajina
vojtajina / mySpec.js
Created July 7, 2013 23:39
Protractor proposal... I can run it with: $ protractor my.conf.js
// This is my TEST...
describe('angularjs homepage', function() {
beforeEach(function() {
navigateTo('http://angularjs.org/');
});
it('should greet', function() {
// any css selector
element('input[ng-model=yourName]').sendKeys('Julie');