commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
e60e9444fc05f60d1794d51119641315969b7137 | Fix gh-pages generation | package-scripts.js | package-scripts.js | const pathTo = require('path').join.bind(null, process.cwd());
exports.scripts = {
dev: 'cross-env NODE_ENV=development webpack-dev-server',
ghPages: [
'npm start -- build.ghPages',
`gh-pages --dist ${pathTo('example')}`
].join(' && '),
build: {
default: [
`rimraf ${pathTo('lib')} ${pathTo('e... | JavaScript | 0.000072 | @@ -188,17 +188,17 @@
s',%0A
-%60
+'
gh-pages
@@ -205,34 +205,24 @@
--dist
-$%7BpathTo('
example'
)%7D%60%0A %5D.
@@ -213,19 +213,16 @@
example'
-)%7D%60
%0A %5D.joi
|
a580f49dc84a7dfc7f5776ead1fd9dbf20215f5e | Remove babel-node from coverage script | package-scripts.js | package-scripts.js | const pathTo = require('path').join.bind(null, process.cwd());
exports.scripts = {
dev: 'cross-env NODE_ENV=development webpack-dev-server',
ghPages: [
'npm start -- build.ghPages',
'gh-pages --dist example'
].join(' && '),
build: {
default: [
`rimraf ${pathTo('lib')} ${pathTo('example')} ${p... | JavaScript | 0 | @@ -1020,71 +1020,108 @@
test
-' +%0A ' babel-node node_modules/.bin/babel-istanbul cover
+ BABEL_DISABLE_CACHE=1' +%0A ' babel-istanbul cover --no-default-excludes -x **/node_modules/**
' +%0A
@@ -1843,58 +1843,107 @@
est
-babel-node node_modules/.bin/babel-istanbul cover
+BABEL_DISABLE_CACHE=1 babe... |
82ed2f43a6394ffb0e7886eefb69a9afc5644cb9 | Add comments | package/helpers.js | package/helpers.js | NOTSET = {};
Helpers = {};
Helpers.applyMutator = function (mutator, options, keyPath/*, arguments*/) {
options = options || {};
var self = this;
var node = Tracker.nonreactive(function () {
return self.get(keyPath, NOTSET);
});
if (node === NOTSET) node = undefined;
if (options.check && !options.che... | JavaScript | 0 | @@ -18,24 +18,103 @@
pers = %7B%7D;%0A%0A
+/**%0A * With %60this%60 as a reactiveObj, applys a given mutator on a key path.%0A */%0A
Helpers.appl
|
ada17f3b6e0f1a29f319467d681c1b74a5c55070 | add unicode test | test/spec/binarySpec.js | test/spec/binarySpec.js | /*global
define, describe, expect, it
*/
/*jslint
browser: true,
white: true
*/
define([
'kb/thrift/transport/echo',
'kb/thrift/protocol/binary'
], function (Thrift) {
'use strict';
function listEquals(l1, l2) {
var i,
len1 = l1.length,
len2 = l2.length;
if (... | JavaScript | 0.002639 | @@ -963,16 +963,377 @@
%7D);%0A%0A
+ it('Sets and gets a very unicode string', function () %7B%0A var transport = new Thrift.EchoTransport(),%0A protocol = new Thrift.TBinaryProtocol(transport),%0A arg = 'hol%C3%A1';%0A protocol.writeString(arg);%0A ... |
05c46006ce2bb79109ba022d5deb21c63d091e1e | Add carousel autoplay | site.js | site.js |
$.extend($.easing,
{
def: 'easeOutQuad',
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
}
});
(function( $ ) {
var setting... | JavaScript | 0.000011 | @@ -3071,16 +3071,62 @@
eed: 500
+,%0A%09autoplay: true,%0A autoplaySpeed: 3000
%0A %7D);
|
1c8424b816b8a2417c99a77ab7d17d41690a70b3 | fix the test case of making the component globally exist | test/specs/test.spec.js | test/specs/test.spec.js | /*
* General specifications GridGallery
* 1- creates a grid using elements that will be in different heights and widths
* 2- will enable gallery view on click to an element of the grid (dialog)
* 3- the dialog will trigger custom events to control data in dialog
* 4- nav of items in grid (disable/enable) depending... | JavaScript | 0.000031 | @@ -535,18 +535,27 @@
.to.
+not.
equal(
-true
+undefined
);%0A
|
342c9a9c24effd48127b50d6598cd3c8c5cdc440 | change user.username.avatar hash code - updated library | test/users.username.avatar.js | test/users.username.avatar.js | const supertest = require('supertest'),
should = require('should'),
crypto = require('crypto'),
path = require('path');
const app = require(path.resolve('./app')),
dbHandle = require(path.resolve('./test/handleDatabase'));
const agent = supertest.agent(app);
describe('/users/:username/avatar'... | JavaScript | 0 | @@ -2327,72 +2327,72 @@
al('
-e4bc10f78c8e645c9fe170c46534e3593f8230cb295f283c0ad2846b64914f12
+7d76d24aee7faf11a3494ae91b577d94cbb5320cec1b2fd04187fff1197915bb
');%0A
|
422e4e1ddfc18e131f893680bb856d72d4506716 | Improve handling of presets | lib/rules/property-sort-order.js | lib/rules/property-sort-order.js | 'use strict';
var helpers = require('../helpers');
var getOrderFile = function (order) {
var filename = false;
if (typeof order === 'string') {
if (order === 'recess') {
filename = 'recess.yml';
}
else if (order === 'smacss') {
filename = 'smacss.yml';
}
else if (order === 'concen... | JavaScript | 0 | @@ -46,16 +46,126 @@
ers');%0A%0A
+var orderPresets = %7B%0A 'recess': 'recess.yml',%0A 'smacss': 'smacss.yml',%0A 'concentric': 'concentric.yml'%0A%7D;%0A%0A
var getO
@@ -168,20 +168,22 @@
getOrder
-File
+Config
= funct
@@ -200,33 +200,8 @@
) %7B%0A
- var filename = false;%0A%0A
if
@@ -248,93 +248,37 @@
... |
f0ecd527fb5a4587524c8954f8d1391bf363d4e1 | Remove social media feed checkbox from SRF | src/data/serviceRequestFields.js | src/data/serviceRequestFields.js | export const singleLineFields = [
{
name: 'Name',
required: true,
type: 'minLength:3',
error: 'Not a valid name'
},
{
name: 'Email',
required: true,
type: 'isEmail',
error: 'Not a valid email'
},
{
name: 'Phone',
required: false,
type: 'minLength:3',
error: 'Not... | JavaScript | 0.000001 | @@ -3009,56 +3009,8 @@
= %5B%0A
- %7B name: 'Social Media (New Platform/Feed)' %7D,%0A
%7B
|
e5d018a0c6b261fcfeb47e064e10f10f60a9c051 | add comments | easy-challenges/AdditivePersistence.js | easy-challenges/AdditivePersistence.js | const assert = require('assert');
// Add numbers in num, if more than one number
// return 1 + the additive persistence of new number
// if there's just one number, return 0
const AdditivePersistence = (num) => {
const arr = num.toString().split('');
while (arr.length > 1) {
let added = 0;
for (let i = 0... | JavaScript | 0 | @@ -1,39 +1,278 @@
-const assert = require('assert');%0A%0A
+/* Objective: Continually add up all the numbers in the parameter until%0Ayou reach a single number. When you reach a single number, return how many%0Atimes you had to add to reach it. */%0A%0A// solution:%0Aconst assert = require('assert');%0A%0Aconst Additi... |
d69f20b2060a7e9a512bcf5df0907fd27eb4102e | Fix interface reference. | lib/endpoints/token.js | lib/endpoints/token.js | exports = module.exports = function(server) {
return server.token();
};
exports['@require'] = [ 'http://schemas.modulate.io/js/aaa/oauth2/Server' ];
exports['@implements'] = [
'http://i.expressjs.com/endpoint',
'http://schemas.modulate.io/js/aaa/oauth2/endpoint/token'
];
| JavaScript | 0 | @@ -99,33 +99,32 @@
%5B 'http://schema
-s
.modulate.io/js/
@@ -149,132 +149,4 @@
%5D;%0A
-%0Aexports%5B'@implements'%5D = %5B%0A 'http://i.expressjs.com/endpoint',%0A 'http://schemas.modulate.io/js/aaa/oauth2/endpoint/token'%0A%5D;%0A
|
32292585046c6938a90a43b5b0ff48bf6a3b07ec | Use ID where it's meant to use an ID | lib/pages/merge.js | lib/pages/merge.js | var React = require("react");
var ActionMixin = require("../logic/actions").ActionMixin([
"pr_info"
]);
module.exports = React.createClass({displayName: 'MergePage',
mixins: [ActionMixin],
componentDidMount: function() {
this.setState({
pr_info: {
pr: this.props.contro... | JavaScript | 0.000012 | @@ -964,21 +964,18 @@
+ pr.get
-Title
+Id
() +%0A
|
5c08a5353f689d70837f01a9c5e6d446d1d38d19 | Normalize CLI output file path | bin/jade.js | bin/jade.js | #!/usr/bin/env node
/**
* Module dependencies.
*/
var fs = require('fs')
, program = require('commander')
, path = require('path')
, basename = path.basename
, dirname = path.dirname
, resolve = path.resolve
, join = path.join
, mkdirp = require('mkdirp')
, jade = require('../');
// jade options
v... | JavaScript | 0.000001 | @@ -4992,32 +4992,50 @@
%7B%0A path =
+ join(program.out,
path.replace(ro
@@ -5042,27 +5042,19 @@
otPath,
-program.out
+'')
);%0A
|
4b799865f6a7379e08070a1f196dde01ec636c70 | Update to 0.0.2. Fix the @description:en mistake. | oneClickRemoveWeiboPost.js | oneClickRemoveWeiboPost.js | // ==UserScript==
// @name oneClickRemoveWeiboPost
// @name:zh-CN oneClickRemoveWeiboPost 一键删除微博
// @name:zh-HK oneClickRemoveWeiboPost 一键删除微博
// @name:zh-TW oneClickRemoveWeiboPost 一键删除微博
// @name:en oneClickRemoveWeiboPost
// @name:ja oneClickRemoveWei... | JavaScript | 0.000015 | @@ -724,55 +724,9 @@
to
-the Followers Page on Sina Weibo (weibo.com). D
+d
irec
@@ -744,21 +744,12 @@
the
-annoying fans
+post
by
@@ -901,17 +901,17 @@
0.0.
-1
+2
%0A// @aut
@@ -966,16 +966,17 @@
http
+s
://weibo
|
9ba5db8bbd4523407fe64a72b18b16e92c2afda1 | Add plugin-console-breadcrumbs to main process | packages/electron/src/client/main.js | packages/electron/src/client/main.js | const electron = require('electron')
const Client = require('@bugsnag/core/client')
const Event = require('@bugsnag/core/event')
const Breadcrumb = require('@bugsnag/core/breadcrumb')
const Session = require('@bugsnag/core/session')
const makeDelivery = require('@bugsnag/delivery-electron')
const { FileStore } = requ... | JavaScript | 0 | @@ -1378,16 +1378,68 @@
rWindow)
+,%0A require('@bugsnag/plugin-console-breadcrumbs')
%0A %5D%0A%0A
|
4fc74b8cd21a714b1a385caa4f2b7258e13ccb79 | Add more tests on makeInitalWorld | spec.js | spec.js | describe('shephy', function () {
var S = shephy;
describe('makeInitalWorld', function () {
it('makes a new world', function () {
var w = S.makeInitalWorld();
[1, 3, 10, 30, 100, 300, 1000].forEach(function (n) {
expect(w.sheepStock[n].length).toEqual(n == 1 ? 6 : 7);
w.sheepStock[n... | JavaScript | 0 | @@ -875,16 +875,977 @@
%7D);%0A
+ it('returns a world with the same regions except Deck', function () %7B%0A var w0 = S.makeInitalWorld();%0A var wt = S.makeInitalWorld();%0A%0A %5B%0A 'sheepStock',%0A 'field',%0A 'enemySheepCount',%0A 'discardPile',%0A 'exile'%... |
8b26e0ab6652394f929a6fed531af6080b1e1bc3 | Use get_channel_details for download summary | contentcuration/contentcuration/frontend/shared/vuex/channel/actions.js | contentcuration/contentcuration/frontend/shared/vuex/channel/actions.js | import pickBy from 'lodash/pickBy';
import { NOVALUE } from 'shared/constants';
import { Channel, Invitation, User } from 'shared/data/resources';
import client from 'shared/client';
/* CHANNEL LIST ACTIONS */
export function loadChannelList(context, payload = {}) {
if (payload.listType) {
payload[payload.listTy... | JavaScript | 0 | @@ -3701,22 +3701,16 @@
annel =%3E
-%0A
client.
@@ -3733,12 +3733,15 @@
get_
-node
+channel
_det
@@ -3757,22 +3757,12 @@
nel.
-root_id))%0A
+id))
);%0A
|
20a5176e75b49fe8e9eea8d18f9fa4146b6e2fb6 | Fix number rep | lib/reps/number.js | lib/reps/number.js | /* See license.txt for terms of usage */
"use strict";
define(function(require, exports, module) {
// Dependencies
const React = require("react");
const { Reps } = require("reps/reps");
const { ObjectBox } = require("reps/object-box");
/**
* @template TODO docs
*/
const Number = React.createClass({
displayName:... | JavaScript | 0.000069 | @@ -386,47 +386,8 @@
ct;%0A
- if (this.props.mode == %22tiny%22) %7B%0A
@@ -393,34 +393,32 @@
return (%0A
-
-
ObjectBox(%7Bclass
@@ -438,117 +438,8 @@
%22%7D,%0A
- value%0A )%0A )%0A %7D%0A else %7B%0A return (%0A ObjectBox(%7BclassName: %22number%22%7D,%0A... |
c8b80f2c10e94369c6b11f568b8d6903b4b061b9 | Use hxl.wrap instead of calling constructors directly. | test/test-hxlfilters.js | test/test-hxlfilters.js | ////////////////////////////////////////////////////////////////////////
// Test various HXL filters
////////////////////////////////////////////////////////////////////////
//
// hxl.classes.BaseFilter
//
QUnit.module("hxl.classes.BaseFilters", {
setup: function () {
this.test_data = [
['Poin... | JavaScript | 0 | @@ -630,31 +630,16 @@
t =
-new hxl.classes.Dataset
+hxl.wrap
(thi
|
0d9cabb1edda88bed2dd5b2d79488044f2ab1e7d | update for maxthon | test/baidu/browser/maxthon.js | test/baidu/browser/maxthon.js | module("baidu.browser.maxthon");
test("maxthon", function() {
try{
//遨游三这个地方改掉了……
window.external.max_invoke("GetHotKey");
ok(baidu.browser.maxthon, 'is maxthon');
}catch(ex){
if(baidu.browser.maxthon == 3)
ok(true, '傲游3居然也抛异常……');
equals(baidu.browser.... | JavaScript | 0 | @@ -64,26 +64,20 @@
%7B%0D%0A%09
-
try
+
%7B%0D%0A%09
-
%09//
+
%E9%81%A8%E6%B8%B8%E4%B8%89%E8%BF%99
@@ -87,24 +87,17 @@
%E6%94%B9%E6%8E%89%E4%BA%86%E2%80%A6%E2%80%A6%0D%0A%09
-
+%09
window.e
@@ -131,24 +131,17 @@
ey%22);%0D%0A%09
-
+%09
ok(baidu
@@ -179,33 +179,29 @@
;%0D%0A%09
- ... |
96e941b802c43256ed89858d0981d1b66b698873 | Revert "Workaround to deal with an issue in node-webkit where the validate function fails on object literals" | lib/utils/parameter-validator.js | lib/utils/parameter-validator.js | 'use strict';
var _ = require('lodash');
var util = require('util');
var validateDeprecation = function(value, expectation, options) {
if (!options.deprecated) {
return;
}
var valid = (value instanceof options.deprecated || typeof(value) === typeof(options.deprecated.call()));
if (valid) {
var messa... | JavaScript | 0 | @@ -190,17 +190,16 @@
valid =
-(
value in
@@ -229,64 +229,8 @@
ated
- %7C%7C typeof(value) === typeof(options.deprecated.call()))
;%0A%0A
@@ -518,276 +518,42 @@
) %7B%0A
-%0A // the second part of this check is a workaround to deal with an issue that occurs in node-webkit when%0A // using object literals. htt... |
963b993187dfb3886e6f73a76a2aa2a258ea8103 | Uppercased some constants | views/game/list.js | views/game/list.js | var _ = require('lodash');
var db = require('../../db');
var gamelib = require('../../lib/game');
var user = require('../../lib/user');
module.exports = function(server) {
function matchesAny(list) {
return (function(x) {
return _.contains(list, x);
});
};
const accepted_filte... | JavaScript | 0.999054 | @@ -299,32 +299,32 @@
const
-accepted_filters
+ACCEPTED_FILTERS
= %7B%0A
@@ -587,52 +587,52 @@
nst
-restricted_filters = _.pick(accepted_filters
+RESTRICTED_FILTERS = _.pick(ACCEPTED_FILTERS
, (f
@@ -670,32 +670,32 @@
ct.keys(
-accepted_filters
+ACCEPTED_FILTERS
).filter
@@ -730,32 +730,32 @@
eturn !!
-a... |
30168260aeca397162548ef6f370a6dbf85a74d7 | Fix page rendering issue | routes/facebook.js | routes/facebook.js | // --------- Dependencies ---------
var User = require.main.require('./models/user');
var validator = require('validator');
require.main.require('./config/custom-validation.js')(validator);
module.exports = function(app, passport, isLoggedIn) {
app.get('/connect/auth/facebook', isLoggedIn,
passport.authen... | JavaScript | 0 | @@ -2573,32 +2573,241 @@
%7D else %7B%0A
+ if (!req.session.flash.connectMessage) %7B%0A req.flash('connectMessage',%0A 'Your Facebook settings have been updated.');%0A %7D%0A
@@ -2841,32 +2841,32 @@
ceboo... |
467e5c6251d2e84221d2ec0fab9a4ec317ae9a79 | use stats in tar.js and core.js (#326) | lib/plugins/tar.js | lib/plugins/tar.js | /**
* TAR Format Plugin
*
* @module plugins/tar
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
* @copyright (c) 2012-2014 Chris Talkington, contributors.
*/
var zlib = require('zlib');
var engine = require('tar-stream');
var util = require('archiver-utils');
/**
* @cons... | JavaScript | 0 | @@ -1646,25 +1646,24 @@
am' && data.
-_
stats) %7B%0A
@@ -1680,17 +1680,16 @@
= data.
-_
stats.si
|
e21417dc8e7335933ab995f8f1224c07baf28985 | increase font-size | lib/views/scripts/bad_browser.js | lib/views/scripts/bad_browser.js | (function() {
function supportsFixed() {
var container = document.body;
if (document.createElement && container && container.appendChild && container.removeChild) {
var el = document.createElement('div');
if (!el.getBoundingClientRect) return null;
el.innerHTML = 'x';
el.style.cssText = 'position:fi... | JavaScript | 0.000039 | @@ -2402,17 +2402,17 @@
t-size:1
-0
+2
px;font-
|
f34fbb7fe77681c09a36ca5df6095a1845a16a73 | add weekly route | routes/lectures.js | routes/lectures.js | "use strict";
// old /upcomingLectures is now /lectures/upcoming !!!
// old /lecturesForGroups is now /lectures/groups !!!
// import the express router
var router = require("express").Router();
// create model
var Lecture = require("../models/model_lecture");
// on routes that end in /lectures
router.route("/")
... | JavaScript | 0.00002 | @@ -190,16 +190,49 @@
ter();%0A%0A
+var moment = require(%22moment%22);%0A%0A
// creat
@@ -1765,16 +1765,1207 @@
%7D%0A%0A
+ // check if we got a proper array%0A if (reqGroups) %7B%0A Lecture.find(query).sort(%7BstartTime: 1%7D).exec(function(err, lectures) %7B%0A if (err... |
a9492f594369885a7064d59c92a16f074d5bd252 | Simplify loop even more | test/test.export_csv.js | test/test.export_csv.js | var assert = require('assert');
var listToCSVString = require('./../responses.js').listToCSVString;
var filterToMostRecent = require('./../responses.js').filterToMostRecent;
var filterAllResults = require('./../responses.js').filterAllResults;
var filterToOneRowPerUse = require('./../responses.js').filterToOneRowPerUse... | JavaScript | 0 | @@ -2868,19 +2868,16 @@
ts);%0A
- //
console
|
ec538ac5e63f1a9dfb749e0eff2e33d55a575b31 | Add a few more beer synonyms | lib/rule/bubble.js | lib/rule/bubble.js | 'use strict';
module.exports = defineRules;
var bubbleJobTitles = [
/gurus?/,
/hero(:?es)/,
/ninjas?/,
/rock\s*stars?/,
/super\s*stars?/
];
var temptations = [
/beers?/,
/brewskis?/,
'coffee',
'foosball',
/keg(?:erator)?s?/,
/nerf\s*guns?/,
/ping\s*pong?/,
/pints?/... | JavaScript | 0.000001 | @@ -172,24 +172,37 @@
tations = %5B%0A
+ /ales?/,%0A
/beers?/
@@ -270,24 +270,39 @@
rator)?s?/,%0A
+ /lagers?/,%0A
/nerf%5Cs*
|
23d2f1b2bf3a3fa88a39c3f0fd358976feec9498 | Implement report feature | src/server/models/lophoc-model.js | src/server/models/lophoc-model.js | import { sequelize, Sequelize } from './index';
import Khoi from './khoi-model';
import NamHoc from './namhoc-model';
const LopHoc = sequelize.define('M_LOP_HOC', {
maLop_pkey: {
type: Sequelize.INTEGER,
primaryKey: true,
notNull: true,
autoIncrement: true,
field: 'MA_LOP_P... | JavaScript | 0 | @@ -1164,36 +1164,38 @@
opHoc.belongsTo(
-Khoi
+NamHoc
, %7B foreignKey:
@@ -1198,38 +1198,38 @@
ey: 'maNamHoc',
-source
+target
Key: 'namHoc_pke
|
7695ccfbbabc1c14a6c317106ae19c71c8c8414e | disable message posting unless user is logged in | routes/messages.js | routes/messages.js | var express = require('express');
var router = express.Router();
var Message = require('../models/message');
router.get('/', function (req, res, next) { // route '/' is /messages in this context
Message.find()
.exec(function (err, messages) {
if (err) {
return res.status(500).js... | JavaScript | 0 | @@ -101,16 +101,51 @@
ssage');
+%0Avar jwt = require('jsonwebtoken');
%0A%0Arouter
@@ -638,32 +638,499 @@
%7D);%0A%7D);%0A%0A
+router.use('/', function (req, res, next) %7B // will be used on every request except .get('/')%0A jwt.verify(req.query.token, 'secret', function(err, decoded)%7B // gives access t... |
c3d551b92c3a286ed0b494643ff67c4e006ff302 | Remove commented code | routes/sendMail.js | routes/sendMail.js | var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
var hbs = require('nodemailer-express-handlebars');
/* GET home page. */
router.post('/', function(req, res, next) {
var data = req.body;
//gather mail options from body
var mailOptions = {
from: data.f... | JavaScript | 0 | @@ -1413,1200 +1413,4 @@
er;%0A
-/*%0Aapp.post('/sendMail', function(req, res) %7B%0A var data = req.body;%0A%0A //gather mail options from body%0A var mailOptions = %7B%0A from: data.from, // sender address%0A to: data.to, // list of receivers%0A subject: data.subject, // Subject line%0A // text: data.... |
ac723c3dac42b29c69f38a4f9c4d4efb6dbe8762 | Fix read of .env variables (#2242) | packages/react-scripts/config/env.js | packages/react-scripts/config/env.js | // @remove-on-eject-begin
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same ... | JavaScript | 0.000001 | @@ -428,16 +428,143 @@
ths');%0A%0A
+// Make sure that including paths.js after env.js will read .env variables.%0Adelete require.cache%5Brequire.resolve('./paths')%5D;%0A%0A
const NO
|
8dccda92338c7877236bdd88a2398b6feba868e5 | Add hotspot to book cover image | packages/test-studio/schemas/book.js | packages/test-studio/schemas/book.js | import BookIcon from 'react-icons/lib/fa/book'
function formatSubtitle(book) {
return [
'By',
book.authorName || '<unknown>',
book.authorBFF && `[BFF ${book.authorBFF} 🤞]`,
book.publicationYear && `(${book.publicationYear})`
]
.filter(Boolean)
.join(' ')
}
export default {
name: 'book',... | JavaScript | 0 | @@ -1088,24 +1088,56 @@
ype: 'image'
+,%0A options: %7Bhotspot: true%7D
%0A %7D,%0A
|
bed4c0696c8bd2c3fea271434bf40c572554f250 | Remove spinner and add some different output | packages/provider/index.js | packages/provider/index.js | const debug = require("debug")("provider");
const Web3 = require("web3");
const { Web3Shim, InterfaceAdapter } = require("@truffle/interface-adapter");
const wrapper = require("./wrapper");
const ora = require("ora");
module.exports = {
wrap: function(provider, options) {
return wrapper.wrap(provider, options);
... | JavaScript | 0.000001 | @@ -186,36 +186,8 @@
r%22);
-%0Aconst ora = require(%22ora%22);
%0A%0Amo
@@ -1174,23 +1174,15 @@
cons
-t spinner = ora
+ole.log
(%22Te
@@ -1204,17 +1204,57 @@
der.
-%22).start(
+..%22);%0A console.log(%22=======================%22
);%0A
@@ -1315,37 +1315,140 @@
%3E %7B%0A
-spinner.fail(
+console.lo... |
5d61d7c91d90aa4763ce91e85d4d99c4807fe231 | clean up | lib/source-maps.js | lib/source-maps.js | 'use strict';
/**
* Module dependencies.
*/
var SourceMap = require('source-map').SourceMapGenerator;
var SourceMapConsumer = require('source-map').SourceMapConsumer;
var sourceMapResolve = require('source-map-resolve');
var urix = require('urix');
var fs = require('fs');
var path = require('path');
/**
* Expose ... | JavaScript | 0.000001 | @@ -12,40 +12,87 @@
';%0A%0A
-/**%0A * Module dependencies.%0A */%0A
+var fs = require('fs');%0Avar path = require('path');%0Avar urix = require('urix');
%0Avar
@@ -268,88 +268,8 @@
e');
-%0Avar urix = require('urix');%0Avar fs = require('fs');%0Avar path = require('path');
%0A%0A/*
|
c3b85500895191a348909daf575731573e1eed9a | correct spacing for issue ticket url | lib/tools/Error.js | lib/tools/Error.js | /**
* Created by apizzimenti on 1/1/17.
*/
var cols = process.stdout.columns,
chalk = require("chalk"),
wrap = require("wordwrap")(4, cols);
function Error (message) {
this.message = message;
}
Error.prototype.throw = function () {
console.log(wrap(chalk.red("Error:\n" + this.message)));
consol... | JavaScript | 0.000002 | @@ -476,16 +476,24 @@
an
-error
+issue ticket
at
+
%22 +%0A
|
0a731075e0072ef9e217a58d8ecd10d5805999fb | Add more tests | test.js | test.js | /*global describe, it */
'use strict';
var assert = require('assert');
var extname = require('./');
describe('extname()', function () {
it('should return a files extension and MIME type', function (cb) {
assert.strictEqual(extname('foobar.tar').ext, 'tar');
assert.strictEqual(extname('foobar.tar')... | JavaScript | 0 | @@ -338,24 +338,308 @@
on/x-tar');%0A
+ assert.strictEqual(extname('foobar.py').ext, 'py');%0A assert.strictEqual(extname('foobar.py').mime, 'text/x-script.python');%0A assert.strictEqual(extname('foobar.pnm').ext, 'pnm');%0A assert.strictEqual(extname('foobar.pnm').mime, 'image/x-portable-... |
00314c6219ec77d8644538d3f81e033f34ff921f | Remove invalid test case | test.js | test.js | const DotTag = styled.div`
color: #ebebeb;
font-size: ${props => props.theme.fontSize};
font-family: Helvetica;
${mixin}
`
const StringTagname = styled('div')`
color: #ff0000;
`
const Component = styled(Component)`
color: #ebebeb;
`
const SegmentedComponent = styled(Segmented.Component)`
... | JavaScript | 0.000036 | @@ -863,37 +863,8 @@
*/%0A
-styled%60%0A height: 12px;%0A%60%0A%0A
(st
|
8a98206fbbe6aff62717dd656b0af37b452fd5d3 | Add tests to s3 signed url | test.js | test.js | import test from 'ava'
import request from 'supertest'
import { exec } from 'mz/child_process'
import createServer from './dist/server.builded'
test('build application', async (t) => {
t.plan(1)
const build = exec('yarn run prestart')
const b = await build
t.truthy(b.join().indexOf('Done'), 'build was done suc... | JavaScript | 0 | @@ -138,16 +138,190 @@
ilded'%0A%0A
+const serverConfig = %7B%0A nodeEnv: test,%0A port: 6006,%0A timeout: 28000,%0A schemaName: 'public',%0A databaseUrl: '',%0A sentryDns: '',%0A s3BucketName: 'vivo-em-nos-staging',%0A%7D%0A%0A
test('bu
@@ -1089,134 +1089,20 @@
ver(
-%7B%0A nodeEnv: test,%0A port: 6006... |
754da9d966173389584a978b1fb779d27feeae70 | switch to underscore.js random function | test.js | test.js | #! /usr/bin/node
var parser = require("./parse.js");
var cexps = require("./cexps.js");
var closures = require("./closure_conversion.js");
var desugar = require("./desugar.js");
var environments = require("./environments.js");
var errors = require("./errors.js");
var tokens = require("./tokenize.js");
var tools = req... | JavaScript | 0.000004 | @@ -636,25 +636,24 @@
_.times(
+_.
random
-Int
(1, n),%0A
@@ -821,25 +821,24 @@
harCode(
+_.
random
-Int
(max, mi
@@ -1069,104 +1069,8 @@
%0A%0A%0A%0A
-function randomInt(min, max) %7B%0A return Math.floor(Math.random() * (max - min + 1)) + min;%0A%7D%0A%0A
var
|
c1e89a21f11616c90beb0c4d79d1d0725a73e548 | Remove try/catch test, replace with emit check. | test.js | test.js | /* jshint node: true */
/* jshint expr:true */
/* global describe, it, afterEach, beforeEach */
'use strict';
var expect = require('chai').expect,
rimraf = require('rimraf'),
gutil = require('gulp-util'),
symlink = require('./'),
path = require('path'),
fs = require('fs');
symlink._se... | JavaScript | 0 | @@ -1355,13 +1355,21 @@
uld
-throw
+emit an error
if
@@ -1398,34 +1398,32 @@
fied', function(
-cb
) %7B%0A
@@ -1441,24 +1441,25 @@
= method();%0A
+%0A
@@ -1462,85 +1462,111 @@
+s
tr
-y %7B%0A stream.write(this.gutilFile);%0A %7D catch (e) %7B
+eam.on('e... |
25c910da797093e8d7f262eb7d7ab13ac5f39d6b | Update environment check | test.js | test.js | import {readFileSync} from 'fs';
import test from 'tape-catch';
import isomorphicEnsure from './module';
if (!require.ensure) require.ensure = isomorphicEnsure({
loaders: {
raw: require('raw-loader'),
json: require('json-loader'),
async: function() { this.async(); },
resolve: function() { this.reso... | JavaScript | 0.000001 | @@ -105,17 +105,23 @@
';%0A%0Aif (
-!
+typeof
require.
@@ -126,16 +126,31 @@
e.ensure
+ !== 'function'
) requir
|
53548d92aebfd61ef4a6d88cb2517780e4a313d6 | Use `typeof` to check the type. | test.js | test.js | 'use strict';
const chai = require('chai');
const mocha = require('mocha');
const describe = mocha.describe;
const beforeEach = mocha.beforeEach;
const it = mocha.it;
const expect = chai.expect;
const circularIterator = require('./');
describe('circular iterator', function() {
let arr;
let iterator;
beforeEac... | JavaScript | 0 | @@ -506,32 +506,39 @@
%7B%0A expect(
+typeof
circularIterator
@@ -546,12 +546,13 @@
.to.
-be.a
+equal
('fu
|
e7e41c75d3d5f61c9a36f716c6f771ad41467adb | change describe | test.js | test.js | 'use strict';
const expect = require('chai').expect;
describe('requiring', () => {
it('should not throw an error', () => {
expect(() => require('./lib')).to.not.throw();
});
});
describe('initializing', () => {
let ConfigLive;
beforeEach(() => {
ConfigLive = require('./lib');
});... | JavaScript | 0.000078 | @@ -1248,16 +1248,14 @@
be('
-starting
+events
', (
|
5bf90cc64c0f1edbbb1b4b79f9ccbb03d65f2f47 | Add test | test.js | test.js | var assertRejected = require("./");
var test = require("blue-tape");
test("rejected promises should pass", function(t) {
return assertRejected(Promise.reject(new Error("Test")));
});
test("message comparisons are made if specified", function(t) {
return assertRejected(Promise.reject(new Error("Test")), "Test");
});... | JavaScript | 0.000005 | @@ -175,24 +175,292 @@
t%22)));%0A%7D);%0A%0A
+test(%22rejected promises should resolve with rejection%22, function(t) %7B%0A%09var error = new Error(%22Test%22);%0A%09return assertRejected(Promise.reject(error)).then(function (x) %7B%0A%09%09if (x !== error) throw new Error(%22Rejected error not sent to .then(). Rece... |
931088ed8827ee11eb68905d65af98dfe9f5cadd | Refactor test | test.js | test.js | 'use strict';
var buzzwords, assert;
buzzwords = require('./');
assert = require('assert');
describe('buzzwords', function () {
it('should be an `Object`', function () {
assert(typeof buzzwords === 'object');
});
});
describe('buzzwords.is(word)', function () {
it('should return true if a word i... | JavaScript | 0.000001 | @@ -8,16 +8,42 @@
rict';%0A%0A
+/**%0A * Dependencies.%0A */%0A%0A
var buzz
@@ -48,16 +48,20 @@
zzwords,
+%0A
assert;
@@ -114,24 +114,43 @@
'assert');%0A%0A
+/**%0A * Tests.%0A */%0A%0A
describe('bu
@@ -634,16 +634,26 @@
var
+all;%0A%0A
all = bu
@@ -748,16 +748,17 @@
n all);%0A
+%0A
@@ -... |
2384bf0eef8717175dbc3fc7add37ce429af037c | support tests with specific plugins | test.js | test.js | var fs = require('fs')
var chalk = require('chalk')
var success = require('success-symbol')
var error = require('error-symbol')
var getSongArtistTitle = require('./')
function stringifyTitle (o) {
return o ? '"' + o[0] + '" - "' + o[1] + '"' : 'nothing'
}
function testFailed (result, expected) {
console.error(ch... | JavaScript | 0 | @@ -581,24 +581,33 @@
on runTest (
+plugins,
test) %7B%0A va
@@ -701,24 +701,33 @@
itle(test%5B0%5D
+, plugins
)%0A if (!res
@@ -964,20 +964,62 @@
ite.
-map(runTest)
+tests%0A .map(runTest.bind(null, suite.plugins))%0A
.for
@@ -1048,16 +1048,18 @@
) %7B%0A
+
+
if (succ
@@ -1061,24 +1061,26 @@
(... |
ab1848da8801ab58b55598c7927548166b632795 | test - updated to use npm | test.js | test.js | var fs = require('fs-extra')
var path = require('path')
var spawn = require('child_process').spawn
var processRoot = process.cwd()
var testFolder = path.join(processRoot, '/test')
function installSample (type) {
return new Promise(function (resolve, reject) {
console.log('installing sample')
var install = sp... | JavaScript | 0 | @@ -641,12 +641,11 @@
wn('
-yarn
+npm
', %5B
@@ -1763,32 +1763,34 @@
'simple')%0A
+
.then(installPac
@@ -1788,32 +1788,34 @@
nstallPackages)%0A
+
.then(prod
@@ -1820,32 +1820,34 @@
oduction)%0A
+
.then(resolve)%0A
@@ -1837,32 +1837,34 @@
.then(resolve)%0A
+
.catch((er
@@ -214... |
b87e97ef85dc79a418f350b51ff1b7b0376ebc0a | fix issue | test.js | test.js |
console.log("test123");
console.log("helloWorld") | JavaScript | 0.000002 | @@ -44,8 +44,9 @@
oWorld%22)
+;
|
c81e491ee1717337f91db7cc521d2129e40e9ce9 | improve readability of test | test.js | test.js | var test = require('tape');
var setLocationHash = require('./dist/set-location-hash.js');
var body = document.body;
body.style.height = '9999px';
// create 'div#some' element
var target = document.createElement('div');
target.id = 'some';
target.style.position = 'absolute';
target.style.top = '5000px';
body.appendCh... | JavaScript | 0.000183 | @@ -110,16 +110,51 @@
t.body;%0A
+body.style.padding = '0 1px 1px 0';
%0Abody.st
@@ -362,16 +362,150 @@
rget);%0A%0A
+var historyAvailable = typeof history.pushState === 'function' &&%0A typeof history.replaceState === 'function';%0A%0A
window.s
@@ -530,23 +530,25 @@
st('
-if hash changed
+se... |
b35796106b19505e39801e09c00b2487556d5686 | make basic types tests | test.js | test.js | var QUnit = require("steal-qunit");
var compute = require("can/compute/");
var define = require("can-define");
var stache = require("can/view/stache/");
QUnit.test("basics on a prototype", function(){
var Person = function(first, last){
this.first = first;
this.last = last;
};
define(Person.prototype,{
fi... | JavaScript | 0.000014 | @@ -1549,13 +1549,1186 @@
s%22);%0A%0A%09%7D);%0A%0A
+QUnit.test(%22basic type%22, function () %7B%0A%0A%09%09QUnit.expect(5);%0A%0A%09%09var Typer = function(arrayWithAddedItem,listWithAddedItem)%7B%0A%09%09%09this.arrayWithAddedItem = arrayWithAddedItem;%0A%09%09%09this.listWithAddedItem = listWithAddedItem;%0A%09%0... |
9d2ea5b33922a41a02f388c7702d7edfceff4738 | fix test | test.js | test.js | 'use strict';
var test = require('ava');
var humanNames = require('./');
test(function (t) {
t.assert(humanNames.female.length > 0);
t.assert(humanNames.male.length > 0);
t.assert(humanNames.all.length > 0);
t.assert(humanNames.femaleRandom());
t.assert(humanNames.maleRandom());
t.assert(humanN... | JavaScript | 0.000002 | @@ -242,32 +242,34 @@
mes.femaleRandom
+En
());%0A t.asser
@@ -287,24 +287,26 @@
s.maleRandom
+En
());%0A t.a
@@ -323,32 +323,34 @@
nNames.allRandom
+En
());%0A t.asser
@@ -371,16 +371,18 @@
llRandom
+En
() !== h
@@ -400,16 +400,18 @@
llRandom
+En
());%0A
|
14a59a95f7c86837e17b3b2ba14575dcc8df87c2 | Tweak test wording | test.js | test.js | import test from 'ava'
import getImgSrc from './'
test('should return img src attributes wtesthin double quotes when they exist', t => {
t.same(getImgSrc('<img class="foo" src="some-image.jpg"></img>'), ['some-image.jpg'])
})
test('should return multiple img src attributes wtesthin single quotes when they exist', t... | JavaScript | 0.000001 | @@ -50,29 +50,23 @@
%0A%0Atest('
-should
return
+s
img src
@@ -223,29 +223,23 @@
%0A%0Atest('
-should
return
+s
multipl
@@ -516,21 +516,15 @@
st('
-should
return
+s
an
|
c0c7b883e654e7f0ec812baaad6bb626591ba9a3 | Remove "api" block | test.js | test.js | 'use strict';
var fs = require('fs');
var assert = require('assert');
var testit = require('testit');
var isExpression = require('./');
testit('api', function () {
testit('no options', function () {
assert(isExpression('myVar'))
assert(!isExpression('var'))
assert(isExpression('["an", "array", "\'s"].in... | JavaScript | 0 | @@ -135,531 +135,8 @@
);%0A%0A
-testit('api', function () %7B%0A testit('no options', function () %7B%0A assert(isExpression('myVar'))%0A assert(!isExpression('var'))%0A assert(isExpression('%5B%22an%22, %22array%22, %22%5C's%22%5D.indexOf(%22index%22)'))%0A %7D)%0A%0A testit('throw === true', function () ... |
42ebc0c573fa2d3a100af2534d9eb7df8b1d0c67 | Fix tests | test.js | test.js | 'use strict'
var test = require('tape')
var iso6392 = require('.')
test('iso6392', function(t) {
t.plan(5)
t.ok(Array.isArray(iso6392), 'should be an `array`')
iso6392.forEach(function(language) {
if (language.iso6391 !== 'en') {
return
}
t.equal(language.iso6392B, 'eng', 'bibliographic cod... | JavaScript | 0.000003 | @@ -352,12 +352,17 @@
2T,
-null
+undefined
, 't
|
9e954f3c40dfdf8c29c9fee7bc0b9edb59f66b33 | test with commented ASCII PBM | test.js | test.js | var fs = require("fs");
var assert = require("assert");
var mask = require("./mask");
function readToArrayBuffer (path, callback) {
var rs = fs.createReadStream(path);
rs.on("readable", function () {
var buffer = rs.read();
var ab = new ArrayBuffer(buffer.length);
var u8 = new Uint8Array(ab);
for (... | JavaScript | 0 | @@ -2426,32 +2426,330 @@
me-ascii.pbm%22);%0A
+ /* Make sure we read commented ASCII PBM correctly. */%0A it(%22Reads commented ASCII PBM%22, function (done) %7B%0A readMask(%22test-data/commented.pbm%22, function (m) %7B%0A console.log(m);%0A assert.equal(m.size.x, 1);%0A assert.equal(... |
7cffdd9ff33370051bcf6416932a7dfbf305e70f | check API access before running tests | test.js | test.js | var util = require ('util');
// Setup
// $ env PIWIK_URL= PIWIK_TOKEN= PIWIK_SITEID= npm test
var url = process.env.PIWIK_URL || null;
var token = process.env.PIWIK_TOKEN || null;
var siteId = process.env.PIWIK_SITEID || null;
var piwik = require ('./').setup (url, token);
// handle exits
var errors = 0;
process.on... | JavaScript | 0.000001 | @@ -1671,16 +1671,415 @@
();%0A%7D%0A%0A%0A
+// ! API access%0Aqueue.push (function () %7B%0A piwik.api (%0A %7Bmethod: 'API.getPiwikVersion'%7D,%0A function (err, data) %7B%0A if (err) %7B%0A console.log ('API access: failed ('+ err.message +')');%0A console.log (err.stack);%0A errors... |
7435975ff48afa36da366bcc9d10c8c767cf7690 | Update test | test.js | test.js | var assert = require('assert');
var read = require('./lib/de-read.js');
var numberLength = read.util.numberLength;
describe('Number length', function () {
for (var i = 0; i <= 9; i++) {
it('The length of number ' + i + ' is 1', (function (j) {
return function () {
assert.equal(1... | JavaScript | 0.000001 | @@ -145,24 +145,121 @@
nction () %7B%0A
+ it('Not a number', function () %7B%0A assert.equal(-1, numberLength('abc'));%0A %7D);%0A %0A
for (var
|
22224f0f1f3ae9dd39a9929058b8ed0252134d4d | Return array rather than array(array) | lib/tfl-bus-api.js | lib/tfl-bus-api.js | var request = require('request')
, Q = require('q')
, _ = require('underscore');
var Bus = function(bus, callback) {
if (!bus) throw new Error('Missing bus number');
var deferred = Q.defer();
this.promise = deferred.promise;
request({
url: 'http://countdown.tfl.gov.uk/search?searchTerm=' + bus
}, fu... | JavaScript | 0.000438 | @@ -1226,16 +1226,19 @@
Geometry
+%5B0%5D
;%0A%7D;%0A%0Amo
|
ebf2c2b0b5fcc78cf8a811d1ff9b72aad9048361 | extend processSend data | lib/utils/index.js | lib/utils/index.js | var mkdirp = require('mkdirp');
var async = require('async');
var fs = require('fs');
var hconsole = require('./hconsole');
exports.hconsole = hconsole;
/**
* Ensures a directory exists using mkdir -p.
*
* @param {String} path
* @param {Function} callback
* @api public
*/
exports.ensureDir = function (path, c... | JavaScript | 0 | @@ -1980,16 +1980,340 @@
d: true%0A
+ %7D,%0A pid: process.pid,%0A stack: %7B%0A couch: %7B%0A port: Number(config.couch.port),%0A host: config.host%0A %7D,%0A www: %7B%0A port: config.www_port,%0A host: config.host%0A %7D,%0A admin:... |
efdb5d911f7b063ecce65b7a847947ca3fd0e765 | Update findHomePath for USERPROFILE | lib/utils/utils.js | lib/utils/utils.js | /*
* Copyright 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | JavaScript | 0 | @@ -1002,16 +1002,19 @@
env.
-HOMEPATH
+USERPROFILE
%7C%7C
@@ -1025,27 +1025,24 @@
ess.env.
-USERPROFILE
+HOMEPATH
;%0A %7D,
|
bcad7388d8f50373c38e7f67c7fa00d1ba36b3a9 | Use full path when spawning a watcher | lib/watcher-src.js | lib/watcher-src.js | // @Compiler-Transpile "true"
// @Compiler-Output "./watcher.js"
const JSToolkit = require('js-toolkit')
const FS = JSToolkit.promisifyAll(require('fs'))
const CPPromise = require('childprocess-promise')
const EventEmitter = require('events').EventEmitter
const Chokidar = require('chokidar')
class Watcher extends Even... | JavaScript | 0 | @@ -570,10 +570,21 @@
ise(
+__dirname +
'
-.
/wat
|
8f6710efd316ecfb78960c720997a2cae7725293 | refactor carousel component to include remove method | res/js/transforms/carousel.js | res/js/transforms/carousel.js | import { $, $$, getAttr, mapCall, toggleClass } from 'luett'
import delegate from 'delegate'
import { range } from 'lodash'
import stroll from 'stroll.js'
function createScroller (el) {
return stroll.factory(el)
}
function attachNav (el, opts) {
el.insertAdjacentHTML('beforeend', `
<div class="${opts.cssN... | JavaScript | 0 | @@ -38,16 +38,24 @@
gleClass
+, remove
%7D from
@@ -769,32 +769,90 @@
%3C/div%3E%0A %60)%0A
+ return %7B remove() %7B remove($(%60.$%7Bopts.cssNav%7D%60), el) %7D%7D%0A
%7D%0A%0Afunction atta
@@ -1280,16 +1280,76 @@
%0A %60)%0A
+ return %7B remove() %7B remove($(%60.$%7Bopts.cssIndex%7D%60), el) %7D%7D... |
ead1c9c8085ec88d5a2db6871d806cf50a41b890 | add status prop | asserts/js/monitoring/node.js | asserts/js/monitoring/node.js | function NodeModule(options) {
this.id = options._id;
this.name = options.name[lang];
this.description = options.description[lang];
this.metrics = options.metrics;
this.workerId = options.workerId;
this.table = options.table;
this.words = options.words;
this.template = '<div class="ca... | JavaScript | 0.000001 | @@ -775,135 +775,617 @@
-this.$moduleBlock.find('.card-block')%0A .css('font-size', '12px')%0A .append('%3Cspan%3E' + metric.name%5Blang%5D + ':%3C/span
+var status;%0A var statusWord = data.status ? this.words.status.up : this.words.status.down;%0A if (data.status) %7B%0A status = '%3C... |
87cddaa906ff405459c7950f28317e2850c231ed | Add some logs | lib/net/rpc-channel.js | lib/net/rpc-channel.js | // telegram-mt-node
// Copyright 2014 Enrico Stara 'enrico.stara@gmail.com'
// Released under the MIT License
// https://github.com/enricostara/telegram-mt-node
// RpcChannel class
//
// This class provides a remote procedure call channel to `Telegram` through the given TCP|HTTP connection.
// This... | JavaScript | 0.000002 | @@ -2225,16 +2225,158 @@
try %7B%0A
+ if (logger.isDebugEnabled()) %7B%0A logger.debug('response: %25s ', response.toString('hex'));%0A %7D%0A
@@ -3013,16 +3013,19 @@
esponse
+%25s
from %25s
@@ -3036,16 +3036,42 @@
to %25s ',
+ response.toString('hex')... |
c8472be787dd991e827ee888bd5d7453698fb663 | Update authentication endpoint for subdirectory | initializers/authentication.js | initializers/authentication.js | var AuthenticationInitializer = {
name: 'authentication',
before: 'simple-auth',
after: 'registerTrailingLocationHistory',
initialize: function (container) {
window.ENV = window.ENV || {};
window.ENV['simple-auth'] = {
authenticationRoute: 'signin',
routeAfterAu... | JavaScript | 0 | @@ -1,8 +1,86 @@
+import ghostPaths from 'ghost/utils/ghost-paths';%0A%0Avar Ghost = ghostPaths();%0A%0A
var Auth
@@ -756,24 +756,25 @@
nt:
-'/g
+G
host
-/api/v0.1
+.apiRoot + '
/aut
|
026d3a611b19140fcc61a8b127ebbc120740c9e1 | fix double semicolon | lib/replace-prelude.js | lib/replace-prelude.js | 'use strict';
var bpack = require('browser-pack');
var fs = require('fs');
var path = require('path');
var xtend = require('xtend');
var preludePath = path.join(__dirname, 'prelude.js');
var prelude = fs.readFileSync(preludePath, 'utf8');
// This plugin replaces the prelude and adds a transform
var plugin = exports.... | JavaScript | 0.00032 | @@ -644,17 +644,16 @@
kOpts));
-;
%0A //
|
ddff23792d8318024d4fb6ac2981bebc02ee0365 | use Object.fromEntries and Object.hasOwn instead of reduce | lib/rules/no-danger.js | lib/rules/no-danger.js | /**
* @fileoverview Prevent usage of dangerous JSX props
* @author Scott Andrews
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const jsxUtil = require('../util/jsx');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Const... | JavaScript | 0.000001 | @@ -96,16 +96,128 @@
rict';%0A%0A
+const has = require('object.hasown/polyfill')();%0Aconst fromEntries = require('object.fromentries/polyfill')();%0A%0A
const do
@@ -248,24 +248,24 @@
/docsUrl');%0A
-
const jsxUti
@@ -609,16 +609,28 @@
RTIES =
+fromEntries(
DANGEROU
@@ -650,93 +650,34 @@
MES.
-reduce((props, p... |
8a71e8abec8b7da38bc0a0594b42bd57370734fa | change default tablename | lib/stores/SqlStore.js | lib/stores/SqlStore.js | var _ = require('lodash');
var extend = require('extend');
var uuid = require('node-uuid');
var util = require('util');
var PostgresAdapter = require('./PostgresAdapter');
var SqliteAdapter = require('./SqliteAdapter');
function SqlStore(opts) {
opts = opts || {};
opts.tableName = opts.tableName || 'ta... | JavaScript | 0.000002 | @@ -313,19 +313,19 @@
e %7C%7C 'ta
-ble
+sks
_' + uui
|
113aad6db5d2b8d677f638dceb60e8a3f58059f0 | remove unnecessary variable | pkg/interface/config/webpack.prod.js | pkg/interface/config/webpack.prod.js | const path = require('path');
// const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const webpack = require('webpack');
module.exports = (env) => return {
mode: 'production',
... | JavaScript | 0.000006 | @@ -275,24 +275,8 @@
ts =
- (env) =%3E return
%7B%0A
@@ -1963,17 +1963,16 @@
ath: '/'
-,
%0A %7D,%0A
|
9075a60a4b1f56e0bf21b17cfe3beb9733567ada | Fix small typo | src/jquery.selector.specifity.js | src/jquery.selector.specifity.js | (function($) {
$.selector.SimpleSelector.addMethod('specifity', function() {
if (this.spec) return this.spec;
var spec = [
this.id ? 1 : 0,
this.classes.length + this.attrs.length + this.pseudo_classes.length,
((this.tag && this.tag != '*') ? 1 : 0) + this.pseudo_els.length
];
$.each(this.nots, ... | JavaScript | 0.00001 | @@ -395,17 +395,16 @@
ns%5B1%5D;
-s
spec%5B2%5D
|
0af74ceb15874f0aa2eb26ded68b6dfdd5309b31 | Add loggin when forceJSONContent function is called | src/main/web/florence/js/functions/_forceContent.js | src/main/web/florence/js/functions/_forceContent.js | function forceContent(collectionId) {
// check user is logged in. userType wont be set unless logged in
if (!localStorage.userType) {
return;
}
// open the modal
var modal = templates.forceContentModal;
$('.wrapper').append(modal);
// on save
$('#force-content-json-form').subm... | JavaScript | 0.000029 | @@ -256,24 +256,54 @@
nd(modal);%0A%0A
+ logForceContentAction();%0A%0A
// on sa
@@ -2923,8 +2923,417 @@
onId)%0A%7D%0A
+%0Afunction logForceContentAction() %7B%0A%0A var logData = %7B%0A user: this.user = localStorage.getItem('loggedInAs'),%0A trigger: %7B%0A elementClasses: %5B%2... |
f996375283befd27138c01f3d5ff5fce23344d3f | Add some doc comments [ci skip] | test/bakery.test.js | test/bakery.test.js | var test = require('tap').test;
var fs = require('fs');
var streampng = require('streampng');
var pathutil = require('path');
var urlutil = require('url');
var oneshot = require('oneshot');
var bakery = require('../lib/bakery');
var IMG_PATH = pathutil.join(__dirname, 'testimage.png');
var ASSERTION_URL = "http://exa... | JavaScript | 0 | @@ -325,16 +325,71 @@
.org%22;%0A%0A
+/**%0A * Get an image stream for the default image.%0A */%0A%0A
function
@@ -476,24 +476,79 @@
gStream;%0A%7D%0A%0A
+/**%0A * Get the image buffer for the default image%0A */%0A%0A
function get
@@ -627,24 +627,80 @@
gBuffer;%0A%7D%0A%0A
+/**%0A * quickly bake an image with the... |
824199f13557f3c193db2c7d1bb2456db0aaa7da | Add relative-time constructor tests. | test/constructor.js | test/constructor.js | module('constructor');
test('create from document.createElement', function() {
var time = document.createElement('time', 'local-time');
equal('TIME', time.nodeName);
equal('local-time', time.getAttribute('is'))
});
test('create from constructor', function() {
var time = new window.LocalTimeElement();
equal(... | JavaScript | 0 | @@ -26,24 +26,35 @@
est('create
+local-time
from documen
@@ -76,32 +76,32 @@
', function() %7B%0A
-
var time = doc
@@ -240,16 +240,27 @@
'create
+local-time
from con
@@ -351,32 +351,32 @@
time.nodeName);%0A
-
equal('local-t
@@ -408,24 +408,437 @@
is'));%0A%7D);%0A%0A
+test('create relative-time from do... |
928fe8e582ef2c1f73acbaeb3510ab78172ff9c5 | Update DataChannel | test/dataChannel.js | test/dataChannel.js | var WEBRTC = require('../');
function P2P(alice, bob) {
alice.onicecandidate = function(event) {
var candidate = event.candidate || event;
bob.addIceCandidate(candidate);
};
bob.onicecandidate = function(event) {
var candidate = event.candidate || event;
alice.addIceCandidate(candidate);
};
... | JavaScript | 0 | @@ -1,15 +1,15 @@
var W
-EB
+eb
RTC = re
@@ -23,16 +23,42 @@
../');%0A%0A
+//WebRTC.setDebug(true);%0A%0A
function
@@ -3293,34 +3293,34 @@
ar alice = new W
-EB
+eb
RTC.RTCPeerConne
@@ -3371,34 +3371,34 @@
var bob = new W
-EB
+eb
RTC.RTCPeerConne
@@ -4197,34 +4197,34 @@
ar alice = new W
-EB
+eb
RTC.RTCPeerCon... |
adcaf8a1ac12847b3907938f412ad7c71c792721 | Add tests for splitBasePath | test/fileHandler.js | test/fileHandler.js | var assert = require('assert')
var fileHandler = require('../lib/fileHandler.js')
var fs = require('fs')
describe('fileHandler', function () {
var testFile = './test.txt'
var testString = 'asdf'
describe('read', function () {
var fileStream = fs.openSync(testFile, 'w')
fs.writeSync(fileStream, testStrin... | JavaScript | 0 | @@ -1631,20 +1631,640 @@
s'))%0A %7D)%0A
+ %7D),%0A%0A describe('splitBasePath', function () %7B%0A it('should return and array with the start and the last file or directory name in a filepath', function () %7B%0A var testSplit = fileHandler.splitBasePath('/foo/bar/yolo/troll')%0A assert.ok(typeof te... |
d902d21c62361da38fa05b6f5d3b4ba34cf23ed2 | add use strict | test/future_test.js | test/future_test.js | var Future = require('../src/future').Future;
var a = require('assert');
describe('futurejs', function () {
describe('then/resolve functions', function () {
it('should call the then callback after resolve was called', function (done) {
// prepare env
var value1 = 1;
var value2 = 2;
// create object und... | JavaScript | 0.00002 | @@ -1,12 +1,27 @@
+'use strict';%0A%0A
var Future =
@@ -4372,8 +4372,9 @@
%09%7D);%0A%7D);
+%0A
|
7bf070d225e7523619ffca4322567ec425cb2418 | test fix | test/helper-test.js | test/helper-test.js | 'use strict';
const chai = require('chai');
const expect = chai.expect;
const path = require('path');
const logger = require('hw-logger');
//const log = logger.log;
const helper = require('../lib/helper');
describe('helper', () => {
before(() => {
logger.setLevel('trace');
});
it('should convert to id', (... | JavaScript | 0.000001 | @@ -973,15 +973,8 @@
umb(
-%7Bpath:
'rep
@@ -1001,17 +1001,16 @@
ir/file'
-%7D
);%0A e
@@ -1037,37 +1037,218 @@
ql(%5B
-'subdir', 'subsubdir', 'file'
+%0A %7B%0A title: 'subdir',%0A url: 'subdir'%0A %7D, %7B%0A title: 'subsubdir',%0A url: 'subdir/subsubdir'%0A %7D, %7... |
fef0a5367c87ec110fca27f5f411df235b824c60 | Fix export | make/configFile.js | make/configFile.js | "use strict";
/*jshint node: true*/
/*eslint-env node*/
const
fs = require("fs"),
path = require("path"),
defaultContent = {
version: 1,
serve: {
httpPort: 8000
},
host: {
wscript: false,
java: false
},
browsers: {},
... | JavaScript | 0.000004 | @@ -1015,16 +1015,17 @@
e.export
+s
= class
|
81092298384de754b51b7a8de1edae3038307dce | Fix auth0 x-frame-options | src/components/molecules/smart_links/SmartLinks.js | src/components/molecules/smart_links/SmartLinks.js | 'use strict';
import React from 'react';
import Settings from 'components/atoms/settings/Settings';
require('./stylesheets/smart_links.scss');
const CLIENT_ID = require('./API_KEY.js').CLIENT_ID; // File is ignored by git
const CLIENT_DOMAIN = require('./API_KEY.js').CLIENT_DOMAIN; // File is ignored by git
class Sm... | JavaScript | 0.000131 | @@ -1569,16 +1569,208 @@
ck.show(
+%7B%7D, function(err, profile) %7B%0A // Popup automatically set to true in this case%0A // auth0 already catch errors%0A localStorage.setItem('userProfile', JSON.stringify(profile));%0A %7D
);%0A %7D%0A
|
77014dc1d8f86df09e940e247ebfe7b9b5ae1d4e | fix case | playground/home-main.js | playground/home-main.js | requirejs.config({
// baseUrl: '/',
paths: {
lodash: 'http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash',
jquery: 'http://code.jquery.com/jquery-1.11.0.min',
firebase: 'https://cdn.firebase.com/js/client/2.0.5/firebase',
react: 'http://fb.me/react-with-addons-0.12.1',
... | JavaScript | 0.000029 | @@ -841,17 +841,17 @@
ct', './
-E
+e
xamples'
|
58da43393378d0ae3011f4f914e5c2ef548a8485 | add more globals | react-native.js | react-native.js | module.exports = {
extends: ['./react-base.js'],
plugins: ['react-native'],
globals: {
__DEV__: false,
fetch: false,
navigator: false,
requestAnimationFrame: false,
},
rules: {
'no-console': 0,
// https://github.com/Intellicode/eslint-plugin-react-native
'react-native/no-color-lite... | JavaScript | 0.000001 | @@ -102,24 +102,88 @@
V__: false,%0A
+ cancelAnimationFrame: false,%0A cancelIdleCallback: false,%0A
fetch: f
@@ -244,16 +244,48 @@
false,%0A
+ requestIdleCallback: false,%0A
%7D,%0A r
|
f9ca6fee6975c0e28ab594cf54e9cbac23543dc2 | Make CommandLoader#bot private | src/lib/command/CommandLoader.js | src/lib/command/CommandLoader.js | 'use babel';
'use strict';
import glob from 'glob';
import path from 'path';
import CommandRegistry from './CommandRegistry';
/**
* Handles loading all commands from the given Bot's commandsDir
* @class CommandLoader
* @param {Bot} bot - Bot instance
*/
export default class CommandLoader
{
constructor(bot)
{
... | JavaScript | 0 | @@ -321,105 +321,20 @@
%09/**
-%0A%09%09 * Bot instance%0A%09%09 * @memberof CommandLoader%0A%09%09 * @type %7BBot%7D%0A%09%09 * @name bot%0A%09%09 * @instance%0A%09%09
+ @type %7BBot%7D
*/%0A
@@ -340,16 +340,17 @@
%0A%09%09this.
+_
bot = bo
@@ -649,24 +649,25 @@
%0A%09%09if (this.
+_
bot.commands
@@ -678,24 +67... |
3c1d0e61002c5424d2b882a8044b75a11c0dd58c | Enable test cases (#2566) | tests/jerry/math-pow.js | tests/jerry/math-pow.js | // Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless r... | JavaScript | 0 | @@ -716,27 +716,24 @@
=== 1.0 );%0A
-//
assert ( Mat
@@ -1350,35 +1350,32 @@
=== Infinity );%0A
-//
assert ( Math.po
@@ -1402,24 +1402,24 @@
=== -0.0 );%0A
+
assert ( Mat
@@ -1578,35 +1578,32 @@
=== Infinity );%0A
-//
assert ( Math.po
@@ -1624,27 +1624,24 @@
=== -0.0 );%0A
-//
assert ( Mat
@@ -1661,35 +1... |
e3ddf8220d0759639d4022bf8277ebbb9a7e1f4b | Update localStorage.js | src/localStorage/localStorage.js | src/localStorage/localStorage.js | angular.module('ngIdle.localStorage', [])
.service('IdleLocalStorage', ['$window', function($window) {
var storage = $window.localStorage;
return {
set: function(key, value) {
storage.setItem('ngIdle.'+key, angular.toJson(value));
},
get: function(key) {
return angular.f... | JavaScript | 0 | @@ -440,88 +440,8 @@
y);%0A
- %7D,%0A parseJson: function(raw) %7B%0A return angular.fromJson(raw);%0A
|
fb26d3982b2811949f0311a73e343d4d3179a50b | use pathname not href | book/nio.js | book/nio.js | require(["gitbook"], function(gitbook) {
gitbook.events.bind("page.change", function(event) {
function resetToc() {
$('.js-toolbar-action > .fa').removeClass('fa-chevron-down--rotate180');
$('.book-header').removeClass('toc-open');
};
function setBodyScroll() {
const scro... | JavaScript | 0.002293 | @@ -849,20 +849,24 @@
ocation.
-href
+pathname
)) %7B%0A
@@ -1147,31 +1147,8 @@
href
- + e.currentTarget.hash
);%0A
@@ -1486,16 +1486,41 @@
%7D;%0A
+ setBodyScroll();%0A
|
82e66e62f5edbe98d64c84084d32c7f2fffb22ef | fix dateinput font on web | src/@ui/inputs/DateInput/index.web.js | src/@ui/inputs/DateInput/index.web.js | import React, { PureComponent } from 'react';
import { createElement } from 'react-native-web';
import { compose, mapProps } from 'recompose';
import PropTypes from 'prop-types';
import moment from 'moment';
import withInputControlStyles from '@ui/inputs/withInputControlStyles';
import { Text as TextInput } from '@ui/... | JavaScript | 0.000001 | @@ -912,33 +912,8 @@
t',%0A
- font: 'inherit',%0A
|
a5dfec0ebd09967bc781c304101995585b59b075 | update forms-material-ui example | examples/forms-material-ui/src/components/tweets/CreateCard.template.js | examples/forms-material-ui/src/components/tweets/CreateCard.template.js | var React = require('react');
var mui = require('material-ui');
var PayloadStates = require('../../constants/PayloadStates');
var _ = require('lodash');
var moment = require('moment');
// Hook Dialogs
var withMuiTheme = require('../../decorators/withMuiTheme').default;
var validators = require('../../utils/validators'... | JavaScript | 0 | @@ -1239,32 +1239,45 @@
m: function() %7B%0A
+ debugger%0A
var data = t
@@ -1291,49 +1291,31 @@
te;%0A
-%0A
-return React.createElement(Template,
+var templateProps =
_.m
@@ -1514,16 +1514,74 @@
t%0A %7D)
+;%0A%0A return (%0A %3CTemplate %7B...templateProps%7D /%3E%0A
);%0A %7D,%0A
|
fa02fb7a401846a3cc1a8842bbd6fc2f2380ddb5 | add extra check to publish.js | publish.js | publish.js | /*
* Copyright (c) 2011-2014 by Animatron.
* All rights are reserved.
*/
/* Variables we get from template:
playerDomain - a URL to player domain host, e.g. player.animatron.com
amazonDomain — a URL to snapshot storage host, e.g. http://snapshots.animatron.com/<snapshot-id>
width — width of the animation
... | JavaScript | 0 | @@ -5237,32 +5237,47 @@
if (anm.interop
+ && anm.interop
.playerjs) %7B%0A
|
ce1ce46e377415ab5965c01d0c24092b2e706b56 | fix jest tests | agent/__tests__/dehydrate-test.js | agent/__tests__/dehydrate-test.js | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use str... | JavaScript | 0.000001 | @@ -1105,34 +1105,36 @@
name: '', meta:
-%7B%7D
+null
%7D);%0A %7D);%0A%0A it(
@@ -1847,18 +1847,20 @@
, meta:
-%7B%7D
+null
%7D);%0A %7D)
|
daa8f93c7ba2517fd18657a66e94d07e80aae95c | Version Number | bot.user.js | bot.user.js | // ==UserScript==
// @name Slither.io-bot
// @namespace http://slither.io/
// @version 0.1.3
// @description Slither.io bot
// @author Ermiya Eskandary & Théophile Cailliau
// @match http://slither.io/
// @grant none
// ==/UserScript==
// Functions needed for the bot start here
//... | JavaScript | 0.000017 | @@ -104,9 +104,9 @@
0.1.
-3
+4
%0A//
|
3770675ac8a27f4dc8b90eb7b478dbe6dcdfbb89 | test hooks | tests/src/util/hooks.js | tests/src/util/hooks.js | 'use strict';
const assert = require('chai').assert;
const validator = require('validator');
const hooks = require('../../../src/util/hooks');
const xssSeed = require('../../../src/seed/xss');
const ip4Seed = require('../../../src/seed/ip4');
const macSeed = require('../../../src/seed/mac');
describe('util/hooks.js',... | JavaScript | 0.000001 | @@ -676,32 +676,140 @@
al(value, xss);%0A
+ return 1;%0A %7D);%0A%0A hooks.set((value) =%3E %7B%0A assert.strictEqual(value, 1);%0A
%7D);%0A%0A
|
325a0defd45fb194c44695d5468d03eff3737f89 | build targets should cover a wider browser range (#346) | tests/dummy/config/targets.js | tests/dummy/config/targets.js | 'use strict';
const browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions',
'last 1 edge versions'
];
module.exports = {
browsers
};
| JavaScript | 0 | @@ -35,17 +35,17 @@
'last
-1
+2
Chrome
@@ -63,17 +63,17 @@
'last
-1
+2
Firefox
@@ -84,24 +84,41 @@
sions',%0A
+ 'Firefox ESR',%0A
'last
1 Safari
@@ -109,17 +109,17 @@
'last
-1
+2
Safari
@@ -135,29 +135,251 @@
,%0A
-'last 1 edge versions
+// Last versions of Microsoft Edge are build on top ... |
a88a9b975441fb8f0f892b8477e97f5fcbf89f32 | fix edge case if element has default tag, but has sigils | builddom.js | builddom.js | const buildDom = (() =>{
const tagRegex = new RegExp('^([\\w\\-]+)([\\.#].*)?$');
const sigilRegex = new RegExp('^([\\.#])([\\w\\-]+)(.*)$');
const contains = {}.hasOwnProperty;
return function buildDom(obj) {
if (obj instanceof Node) {return obj}
if (Array.isArray(obj)) {return obj.map(buildDom)}
if (typeof ... | JavaScript | 0.000001 | @@ -568,16 +568,26 @@
ch%5B2%5D :
+selector%7C%7C
'';%0A%09%09co
|
e89f509fc50decc515ccc6862d818119a4329cd6 | add test modification | test/server-test.js | test/server-test.js | var chai = require('chai');
var chaiHttp = require('chai-http');
chai.use(chaiHttp);
var expect = chai.expect;
require(__dirname + '/../server.js');
var mongoose = require('mongoose');
var User = require(__dirname + '/../models/user');
process.env.MONGOLAB_URI = 'mongodb://localhost/user_test';
describe('the server', ... | JavaScript | 0 | @@ -1398,254 +1398,8 @@
);%0A%0A
- it('should GET a registered end point', function(done)%7B%0A chai.request('localhost:3000')%0A .get('/transformed')%0A .end(function(err, res)%7B%0A expect(err).to.eql(null);%0A expect(res.status).to.eql(200);%0A done();%0A %7D);%0A %7D);%0A%0A
it
|
580fa8a9f6105376a28c09a732a0e6263133c5ff | add routes for non-retina assets | tests/mapbox-server/create.js | tests/mapbox-server/create.js | /* global FakeXMLHttpRequest */
import Pretender from 'pretender';
import Sprites from './data/sprites';
import SpritesPng from './data/sprites-png';
import Style from './data/style';
import Terrain from './data/terrain';
// have to monkeypatch until https://github.com/pretenderjs/FakeXMLHttpRequest/issues/31 is fixe... | JavaScript | 0 | @@ -1371,19 +1371,16 @@
9/sprite
-@2x
.json',
@@ -1459,16 +1459,329 @@
Sprites
+ %5D;%0A %7D);%0A%0A this.get('https://api.mapbox.com/styles/v1/mapbox/streets-v9/sprite@2x.json', function() %7B%0A return %5B 200, %7B 'content-type': 'application/json' %7D, Sprites %5D;%0A %7D);%0A%0A this.get('htt... |
55b50de408063178d1084551c4dcb94cb6cc991b | Fix digest algorithm for signer in test | test/signed_data.js | test/signed_data.js | "use strict";
var assert = require("assert");
var fs = require("fs");
var trusted = require("../index.js");
var DEFAULT_RESOURCES_PATH = "test/resources";
var DEFAULT_OUT_PATH = "test/out";
describe("SignedData", function() {
var cert, key;
before(function() {
try {
fs.statSync(DEFAULT_O... | JavaScript | 0.00001 | @@ -1181,17 +1181,19 @@
me, %22sha
-1
+256
%22);%0A
@@ -2375,17 +2375,19 @@
me, %22sha
-1
+256
%22, %22Wron
|
603e259f36a2fbaf65da6e7425b4a7e799919724 | Test page with controls | test/test-player.js | test/test-player.js | var jumping = false;
setTimeout(function() {
jumping = true;
}, 1000);
setTimeout(function() {
jumping = false;
}, 2000);
var testPlayer = {
positionX: 193,
positionY: 175,
width: 35,
height: 70,
update: function(game) {
game.offsetX += 2;
if(jumping) game.offsetY += 1;
},
draw: function(d) {
d.fillSty... | JavaScript | 0 | @@ -1,36 +1,98 @@
var
-jumping = false;%0AsetTimeout(
+right = false, left = false, up = false, down = false;%0Awindow.addEventListener(%22keydown%22,
func
@@ -100,50 +100,221 @@
ion(
+e
) %7B%0A%09
-jumping = true;%0A%7D, 1000);%0AsetTimeout(
+switch(e.keyCode) %7B%0A%09%09case 40:%0A%09%09%09down = true;%0A%09%... |
1c6139aeafbb336baf11dcb2271956a091dd6267 | update "browser" test | test/testBrowser.js | test/testBrowser.js | function runBrowserTests() {
// Mock objects
const div = document.createElement("div");
// asyncTest("Test navigation option", function () {
//
// const options = {
// genome: "hg19",
// showNavigation: false
// };
//
// igv.createBrowser(div, optio... | JavaScript | 0.000003 | @@ -95,19 +95,16 @@
%22);%0A%0A
- //
asyncTe
@@ -146,29 +146,20 @@
on () %7B%0A
- //
%0A
- //
con
@@ -172,27 +172,24 @@
ions = %7B%0A
- //
gen
@@ -205,26 +205,24 @@
9%22,%0A
-//
showNav
@@ -209,25 +209,24 @@
-
showNavigati
@@ -242,19 +242,16 @@
%0A
... |
2364fe4e890fcd8295a37d6da9047444fe0b6e0e | fix test | test/test_server.js | test/test_server.js | var assert = require('assert');
var should = require('should');
var request = require('request');
var supertest = require('supertest');
var api = require('../src/main').api();
describe('jenkins test project', function() {
it('should got hello jenkins', function() {
request.get('http://localhost:8090', fun... | JavaScript | 0.000002 | @@ -257,32 +257,34 @@
', function() %7B%0A
+//
request.
@@ -331,24 +331,26 @@
r, body) %7B%0A
+//
@@ -387,16 +387,18 @@
nkins')%0A
+//
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.