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
import element from 'virtual-element'; // Using deku | |
// import React from 'react'; // Switch to this if you are using React | |
import pathToRegexp from 'path-to-regexp'; | |
export function renderRoutes(path, routes) { | |
return Object.keys(routes).map(routePath => { | |
let paramsInfo = []; | |
let re = pathToRegexp(routePath, paramsInfo); | |
let paramNames = paramsInfo.map(p => p.name); |
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 productCollection = {}; | |
var eventMediator = {}; | |
var viewUtils = new utils(); | |
window.products = new Products(); | |
window.product; | |
window.CartView = Backbone.View.extend({ | |
template : _.template(viewUtils.getTemplate('Cart')), | |
render : function(eventName) { |
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 module, moduleStart, testStart, testCases = [], | |
current_test_assertions = []; | |
console.log('<?xml version="1.0" encoding="UTF-8"?>'); | |
console.log('<testsuites name="testsuites">'); | |
QUnit.begin = function() { | |
// That does not work when invoked in PhantomJS | |
} | |
QUnit.moduleStart = function(context) { | |
moduleStart = new Date(); |