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
package snippet; | |
import static snippet.Snippet.ClassPattern.inCaseOf; | |
import static snippet.Snippet.IntegerPattern.inCaseOf; | |
import static snippet.Snippet.OtherwisePattern.otherwise; | |
import static snippet.Snippet.StringPattern.inCaseOf; | |
import com.google.common.base.Function; | |
public class Snippet { |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def archive_to_bytes(archive): | |
def to_seconds(s): | |
SECONDS_IN_A = { | |
's': 1, | |
'm': 1 * 60, | |
'h': 1 * 60 * 60, |
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 tu = require('../tu'); // tu == test utils | |
const expect = tu.expect; | |
const withDocument = tu.withDocument; | |
const componentHtmlAndScript = { | |
html: ` | |
<textarea id="editableArea"></textarea> | |
<div id="counter"></div> | |
`, | |
// load the JS module under test |
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 path = require('path'); | |
const _ = require('lodash'); | |
const AssertionError = require('assertion-error'); | |
const chai = require('chai'); | |
const chaiAsPromised = require('chai-as-promised'); | |
const jsdom = require('jsdom'); | |
const Q = require('q'); | |
const sinonChai = require('sinon-chai'); |
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
<p>should be shown 1</p> | |
<p>should be shown 2</p> | |
<p>should be shown 3</p> | |
<form modelAttribute="formModel"> | |
<input type="number" value="form model member value" id="formModelMember" name="formModelMember" data-plop="name 1"/> | |
<input type="date" value="toto"> | |
<input type="number" value="42"> | |
<input type="number" value="form model member value" id="formModelMember" name="formModelMember" data-plop="name 2"/> | |
<input type="date" value="toto"> |
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 tu = require('../tu'); | |
const expect = tu.expect; | |
const withDocument = tu.withDocument; | |
const ratingStarsJspAndScript = { | |
jsp: 'include/editableRatingStars', | |
hopModules: 'Hop/components/editable-rating-stars', | |
attributes: { | |
param: {path: 'someRadioInput'} | |
} |
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
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> | |
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | |
<div class="no-mg editable-rating-stars"> | |
<div class="stars"> | |
<ul class="inline-list no-lstyle"> | |
<c:forEach begin="1" end="5" var="rate"> | |
<li class="star"> |
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
jspackConfiguration.module.loaders.push({ | |
test: /\.hbs$/, | |
loader: 'handlebars-loader' + | |
// Tell handlebars-loader where our custom helpers are to be found. | |
// Note: helpers' names are derived from their file name. | |
'?helperDirs[]=' + __dirname + '/handlebars-helpers' + | |
// Force handlebars-loader not to include Handlebars runtime, | |
// since it is already included in our common bundle. |
OlderNewer