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 |
|---|---|---|---|---|---|---|---|
d2e9581f0b6d2c668a16fbab64d64bef78416d0e | Fix scale when reading from a geometry file. | server/util/wall_geometry.js | server/util/wall_geometry.js | /* Copyright 2019 Google Inc. All Rights Reserved.
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 or agreed to in ... | JavaScript | 0 | @@ -2752,16 +2752,38 @@
y_file))
+.scale(xscale, yscale)
;%0A %7D%0A%7D%0A
|
91970c5eac8cd1ff53b9ac8dd2c50f7f2a2bf9e6 | remove flash.destroy as it fails on latest builds of Ember (#218) | tests/unit/components/flash-message-test.js | tests/unit/components/flash-message-test.js | import Ember from 'ember';
import {
moduleForComponent,
test
} from 'ember-qunit';
import FlashMessage from 'ember-cli-flash/flash/object';
const {
run,
get,
set
} = Ember;
let flash;
moduleForComponent('flash-message', 'FlashMessageComponent', {
unit: true,
beforeEach() {
flash = FlashMessage.crea... | JavaScript | 0 | @@ -468,56 +468,8 @@
) %7B%0A
- run(() =%3E %7B%0A flash.destroy();%0A %7D);%0A%0A
|
653e8358ddb7e82e78ccef183036013a5365df69 | Add deep test | test/manager.create.js | test/manager.create.js | var assert = require('assert');
var Promise = require('bluebird');
var Bootstrap = require('./support/bootstrap');
var manager = require('./support/manager');
describe('manager', function() {
describe('.create', function() {
Bootstrap.beforeEach(Bootstrap.database);
Bootstrap.beforeEach(Bootstrap.tab... | JavaScript | 0.000012 | @@ -4592,16 +4592,1108 @@
%0A %7D);
+%0A%0A it('should create a deep object', function(done) %7B%0A manager.create('make', %7B%0A name: 'BMW',%0A models: %5B%0A %7B%0A name: 'X5',%0A cost: 50000,%0A type: %7B%0A name: 'Crossover'%0A ... |
a2b3744c2939c2f8511b790de297277f76b96a28 | Replace all occurences of substrings instead of one | src/libs/better.js | src/libs/better.js | /* global _: true */
var better = {};
/**
* Better key
* Transform a bad formated string in a good key name
*/
better.key = function(value){
value = value
.replace(String.fromCharCode(58), '')
.replace(String.fromCharCode(160), String.fromCharCode(32));
return _.camelCase(value);
};
/**
* Better val... | JavaScript | 0.999994 | @@ -161,32 +161,43 @@
ue%0A .replace(
+new RegExp(
String.fromCharC
@@ -204,16 +204,22 @@
ode(58),
+ 'g'),
'')%0A
@@ -220,32 +220,43 @@
')%0A .replace(
+new RegExp(
String.fromCharC
@@ -256,32 +256,38 @@
omCharCode(160),
+ 'g'),
String.fromChar
@@ -471,16 +471,27 @@
replace(
+new RegExp(
String.f
@... |
f2620c42762313479f8f3d6110b3e026b39db457 | Fix `moduleForComponent` syntax | tests/unit/components/pikaday-input-test.js | tests/unit/components/pikaday-input-test.js | import { test, moduleForComponent } from 'ember-qunit';
import Ember from 'ember';
import { openDatepicker } from 'ember-pikaday/helpers/pikaday';
moduleForComponent('pikaday-input', 'PikadayInputComponent');
test('is an input tag', function(assert) {
assert.equal('INPUT', this.$().prop('tagName'));
});
test('the ... | JavaScript | 0.0004 | @@ -200,16 +200,20 @@
mponent'
+, %7B%7D
);%0A%0Atest
|
4a7304c9ac22d3b0fae53be46ee84a5dc5b01d94 | use correct setters | static/js/addons/cl.utils.js | static/js/addons/cl.utils.js | /*!
* @author: Divio AG
* @copyright: http://www.divio.ch
*/
//######################################################################################################################
// #NAMESPACES#
/**
* @module Cl
*/
var Cl = window.Cl || {};
//################################################################... | JavaScript | 0.00016 | @@ -2512,35 +2512,43 @@
if (
-window.localStorage
+typeof(Storage) !== void(0)
) %7B%0A
@@ -2839,27 +2839,35 @@
if (
-window.localStorage
+typeof(Storage) !== void(0)
) %7B%0A
|
d061590f5b5e39314f88a83bdbabb733b7410d75 | Move areInValue method | static/js/form-collection.js | static/js/form-collection.js | 'use strict';
window.define(['react', 'color-picker', 'underscore'], function (React, ColorPicker, _) {
var searchableTypes = [
'name',
'defaultValue',
'value',
'label'
];
var FormCollection = React.createClass({
areDefined: function (value) {
return typeof value !== 'undefined';
... | JavaScript | 0.000004 | @@ -313,24 +313,126 @@
d';%0A %7D,%0A%0A
+ areInValue: function (value, term) %7B%0A return value.toLowerCase().indexOf(term) %3E= 0;%0A %7D,%0A%0A
contains
@@ -463,24 +463,47 @@
lue, key) %7B%0A
+ var self = this;%0A
var se
@@ -625,114 +625,8 @@
);%0A%0A
- var areInValue = functi... |
7dcdd9048d08c1c455b0ffd8c9b36635d122cd82 | simplify reading of implementation | src/modules/list/zip.es6 | src/modules/list/zip.es6 | import {curry} from '../functional/curry';
/* jshint -W067 */
export
const zip = curry((arr1, arr2) => (
(aux =>
(aux = ([x1,...arr1], [x2,...arr2], acc) =>
x1 === undefined || x2 === undefined ? acc
: aux(arr1, arr2, [...acc, [x1, x2]])
)(arr1, ar... | JavaScript | 0.000008 | @@ -41,96 +41,23 @@
';%0A%0A
-/* jshint -W067 */%0Aexport%0A
+%0A
const
+_
zip =
+%0A
-curry((arr1, arr2) =%3E (%0A (aux =%3E%0A (aux =
(%5Bx
@@ -90,20 +90,16 @@
acc) =%3E%0A
-
x1 =
@@ -182,17 +182,14 @@
-
-
:
-aux
+_zip
(arr
@@ -220,62 +220,73 @@
2%5D%5D)
-%0A )(arr1, ar... |
005f3368c00f176c7a186252ce2379bf83d8717b | Remove setTimeout hack from ExampleIcon.ready. | library/CM/Form/ExampleIcon.js | library/CM/Form/ExampleIcon.js | /**
* @class CM_Form_ExampleIcon
* @extends CM_Form_Abstract
*/
var CM_Form_ExampleIcon = CM_Form_Abstract.extend({
/** @type String */
_class: 'CM_Form_ExampleIcon',
events: {
'click .iconBox': function(event) {
this.selectIcon($(event.currentTarget));
}
},
ready: function() {
this.on... | JavaScript | 0 | @@ -384,63 +384,12 @@
-var self = this;%0A setTimeout(function() %7B%0A self
+this
._up
@@ -403,19 +403,8 @@
();%0A
- %7D, 0);%0A
%7D,
|
7facb6f5575b41975925bbba1d207c30c595504e | add cache namespace flush tests | test/services/cache.js | test/services/cache.js | import test from 'ava';
import DI from '../../src/di';
import * as providers from '../../src/services/providers';
DI.registerMockedProviders(Object.values(providers), `${__dirname}/../_demo_project/config`);
const cache = DI.get('cache');
test.beforeEach('Flush all', () => {
cache.flush();
});
test('Cache get & se... | JavaScript | 0 | @@ -1892,20 +1892,345 @@
e('ns').flush();%0A%7D);
+%0A%0Atest('Cache namespace flush returns', async(t) =%3E %7B%0A t.is(await cache.namespace('ns').flush(), 0);%0A%0A await cache.namespace('ns').set('foo1', 'bar1', 0, 'nx');%0A await cache.namespace('ns').set('foo2', 'bar2', 0, 'xx');%0A await cache.namespace('ns... |
1116a4a08a2c32709f78f6201d9a499551da2266 | Use exponential notation in integration test timeout setup | setup-integration-timeout.js | setup-integration-timeout.js | "use strict";
// allow CLI integration tests to run for awhile
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;
| JavaScript | 0.000004 | @@ -56,16 +56,23 @@
r awhile
+ (300s)
%0Ajasmine
@@ -102,13 +102,12 @@
AL = 300
-000
+e3
;%0A
|
192715add404d2b7b363c184d7b68c4fd09c18da | add spec name console | test/ssr/build-test.js | test/ssr/build-test.js | /**
* @file build test file
* @author zhoumin
*/
const san = require('../../dist/san.ssr');
const fs = require('fs');
const path = require('path');
let htmlTpl = fs.readFileSync(path.resolve(__dirname, '../index-ssr.html.tpl'), 'UTF-8');
let html = '';
let specTpls = '';
// generate html
let genContent = functio... | JavaScript | 0.000001 | @@ -2816,24 +2816,81 @@
f (isDir) %7B%0A
+ console.log(%60%5BBuild SSR spec%5D $%7Bfilename%7D%60);%0A
|
21fa78de5f733a22397812f77850b5fb54a089ac | Add support for multi-test meta tests. | test/support/runner.js | test/support/runner.js | #!/usr/bin/env node
var glob = require('glob')
var path = require('path')
var _ = require('lodash')
var async = require('async')
var teenytest = require('../../index')
var globLocator = process.argv[2] || 'test/*.js'
var passing = false
async.series(_.map(glob.sync(globLocator), function (file) {
return function (... | JavaScript | 0 | @@ -294,16 +294,110 @@
file) %7B%0A
+ var metaTest = require(path.resolve(process.cwd(), file))%0A if (_.isFunction(metaTest)) %7B%0A
return
@@ -409,24 +409,26 @@
tion (cb) %7B%0A
+
teenytes
@@ -453,24 +453,26 @@
erAll()%0A
+
+
console.log(
@@ -513,54 +513,288 @@
-require(path.resolve(proc... |
982a7cccb5abdb32d15c5703451e32275c9786ae | Fix duplicate variable causing test failure. | test/tap/prepublish.js | test/tap/prepublish.js | // verify that prepublish runs on pack and publish
var test = require('tap').test
var npm = require('../../')
var fs = require('fs')
var pkg = __dirname + '/prepublish_package'
var tmp = pkg + '/tmp'
var cache = pkg + '/cache'
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var npm = require('npm')
var pa... | JavaScript | 0.000002 | @@ -286,33 +286,8 @@
f')%0A
-var npm = require('npm')%0A
var
|
9c467f585f35e90c045908cc8714f052a93eedd4 | update test code | test/test.core.type.js | test/test.core.type.js | describe('ax5.util.getType TEST', function() {
var testCases = [
{
args: [ 1 ],
expect: 'number'
},
{
args: [ '1' ],
expect: 'string'
},
{
args: [ [0, 1, 2] ],
expect: 'array'
},
{
... | JavaScript | 0.000001 | @@ -1017,16 +1017,98 @@
window'%0A
+ %7D,%0A %7B%0A args: %5B jQuery %5D,%0A expect: 'function'%0A
|
ee8ac046e4f4331a27f9afdd829cb9ad95a0a3b1 | Update rule on ajax success | src/mist/io/static/js/app/controllers/rules.js | src/mist/io/static/js/app/controllers/rules.js | define('app/controllers/rules', ['app/models/rule', 'ember'],
//
// Rules Controller
//
// @returns Class
//
function (Rule) {
'use strict';
return Ember.ArrayController.extend(Ember.Evented, {
//
//
// Properties
//
... | JavaScript | 0 | @@ -2979,32 +2979,65 @@
%7D);%0A%0A
+ var that = this;%0A
@@ -3159,16 +3159,116 @@
+).success(function (data) %7B%0A that._updateRule(args.rule, data);%0A %7D
).error(
|
fd20e9fe93bea6e6032d720cec46154d04945e7d | add support for http-parser jenkins jobs (#154) | scripts/jenkins-status.js | scripts/jenkins-status.js | 'use strict'
const pushJenkinsUpdate = require('../lib/push-jenkins-update')
const enabledRepos = ['citgm', 'node']
const jenkinsIpWhitelist = process.env.JENKINS_WORKER_IPS ? process.env.JENKINS_WORKER_IPS.split(',') : []
function isJenkinsIpWhitelisted (req) {
const ip = req.connection.remoteAddress
if (jenki... | JavaScript | 0 | @@ -101,16 +101,31 @@
'citgm',
+ 'http-parser',
'node'%5D
|
f19eedbfbe1b7ad6d7d866139ec79863a5ebe0f7 | fix failing test | libs/build_tools/js_handler.js | libs/build_tools/js_handler.js | // vendor dependencies
var babel = require('gulp-babel')
var sourcemaps = require('gulp-sourcemaps')
// local dependencies
var logger = require(enduro.enduro_path + '/libs/logger')
// * ———————————————————————————————————————————————————————— * //
// * JS Task
// * Transpile ES6 to JS
// * ———————————————————————————... | JavaScript | 0.000006 | @@ -98,30 +98,193 @@
s')%0A
-%0A// local dependencies
+var Promise = require('bluebird')%0Avar fs = Promise.promisifyAll(require('fs-extra'))%0A%0A// local dependencies%0Avar flat_helpers = require(enduro.enduro_path + '/libs/flat_db/flat_helpers')
%0Avar
@@ -1624,16 +1624,303 @@
nable')%0A
+%09%09%09var copy_from =... |
6482eeb13711744477b7bef5d5a370925fc881c2 | Update pl_PL.js | javascript/lang/pl_PL.js | javascript/lang/pl_PL.js | if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
console.error('Class ss.i18n not defined');
} else {
ss.i18n.addDictionary('pl_PL', {
'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Należy najpierw zapisać stronę, aby móc dodać strony podrzędne",
'CMSMAIN.CANTADDCHILDREN' : "Nie można dodać stron podr... | JavaScript | 0.000003 | @@ -1193,16 +1193,17 @@
anie...'
+,
%0A%09%09'CMSM
|
6fe39efa6b1dff6134346b4a4274b1dcaee878fe | Fix error handling when fetching source | scripts/packages/index.js | scripts/packages/index.js | 'use strict';
var Promise = require('bluebird');
var xhr = require('../shared/xhr');
var format = require('../shared/format');
var distributions = ['stable', 'testing', 'unstable', 'experimental'];
var waitDiv = document.querySelector('#wait');
var fileTypeRenderers = {
file: fileRenderer,
folder: folderRe... | JavaScript | 0.000009 | @@ -324,16 +324,28 @@
rer%0A%7D;%0A%0A
+var source;%0A
try %7B%0A
@@ -342,28 +342,24 @@
;%0Atry %7B%0A
-var
source = pat
@@ -395,20 +395,51 @@
hname);%0A
-
+%7D catch(e) %7B%0A catchError(e);%0A%7D%0A%0A
(functio
@@ -442,28 +442,24 @@
ction r() %7B%0A
-
findSour
@@ -513,20 +513,16 @@
... |
4f5f142007f806988cb9be60cfb59783cf2a5bde | Add now navigates to Lists page | client-src/js/components/list-edit-component.js | client-src/js/components/list-edit-component.js | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { addNewList } from '../actions';
class ListEdit extends Component {
constructor(props) {
super(props);
this.state = {listName: ''};
}
saveClickHandler(e) {... | JavaScript | 0 | @@ -441,16 +441,54 @@
tName);%0A
+ this.props.history.push('/');%0A
%7D%0A%0A
|
49b9239d7c570460772c1e8b43b93c619bbb569e | add semicolon | pocky/index.test.js | pocky/index.test.js | /* eslint-env node, jest */
jest.mock('axios');
jest.mock('../achievements');
jest.mock('../lib/slackUtils')
const axios = require('axios');
const pocky = require('./index.js');
const Slack = require('../lib/slackMock.js');
let slack = null;
beforeEach(() => {
slack = new Slack();
process.env.CHANNEL_SANDBOX = sl... | JavaScript | 0.998846 | @@ -102,16 +102,17 @@
kUtils')
+;
%0A%0Aconst
|
0b05b61d974192dd786ff8377dd88214791af4ac | Update core.js | src/modula/core.js | src/modula/core.js | /**
* @project : modula.js
* @package : core
* @internal : modula.core
* @type : object
* @dependencies : none
*
* @description :
* the modula.core is the object used when NO selector is given to the modula.js
* here in are only the basic functions available
*/
/**
* define modula.core and it's prototype... | JavaScript | 0.000001 | @@ -451,17 +451,43 @@
er(
-%22
+'
extend
-%22
+' ),%0A%0A%09%09task : tasks.create(
),%0A%0A
|
4d215e542cbce6a96a88f17a19808a56fd0bf151 | introduce the list.delete() function | app/transactions.js | app/transactions.js | "use strict";
var _ = require('lodash'),
redis = require('redis'),
when = require('when'),
moment = require('moment'),
url = require('url'),
redisClient, redisURL;
if (process.env.NODE_ENV === 'production') {
redisURL = url.parse(process.env.REDISCLOUD_URL);
redisClient = redis.createClient(redisURL.port... | JavaScript | 0.000179 | @@ -3833,16 +3833,17 @@
week);%0A
+%0A
return
|
25a5360b6be790484a8d0f09a51da1f5140ca0c4 | fix whitespace cut | lib/build/css/validateNames.js | lib/build/css/validateNames.js | (module.exports = function(flow){
var fconsole = flow.console;
var idMap = flow.css.idMap;
var classMap = flow.css.classMap;
var warnCount = 0;
//
// warnings
//
var warnNoStyle = [];
var warnNoHtml = [];
for (var name in classMap)
{
var list = classMap[name];
var inHtml = list.sources.h... | JavaScript | 0.028978 | @@ -2164,16 +2164,35 @@
eet%5Bidx%5D
+ && stylesheet%5Bidx%5D
%5B1%5D == '
|
20baf5ee9f48c99653f0d801c858f951adbcaba2 | call path.join once and store in fspath var | lib/cmds/template_generator.js | lib/cmds/template_generator.js | var fs = require('../core/fs.js');
var path = require('path');
var utils = require('../utils/utils.js');
var TemplateGenerator = function(templateName) {
this.templateName = templateName;
};
TemplateGenerator.prototype.generate = function(destinationFolder, name) {
var templatePath = fs.embarkPath(this.templateNa... | JavaScript | 0 | @@ -379,36 +379,22 @@
n);%0A
-%0A
-fs.copySync(templatePath,
+var fspath =
pat
@@ -428,56 +428,65 @@
ame)
-)
;
+%0A
%0A
-utils.cd(path.join(destinationFolder, name)
+fs.copySync(templatePath, fspath);%0A utils.cd(fspath
);%0A
@@ -721,42 +721,14 @@
n +
+fs
path
-.join(destinationFolder, name)
);%0A%0A... |
fe0de38d3a247ca30315dc25179fe2227f3da91d | save jsreport package dependency in package.json when installing it | lib/commands/_initializeApp.js | lib/commands/_initializeApp.js | 'use strict'
var path = require('path')
var fs = require('fs')
var Promise = require('bluebird')
var install = require('npm-install-package')
function initializeApp (cwd, force) {
return new Promise(function (resolve, reject) {
var existsPackageJson = fs.existsSync(path.join(cwd, './package.json'))
var jsre... | JavaScript | 0 | @@ -4010,16 +4010,32 @@
sreport,
+ %7B save: true %7D,
functio
|
ecff36279f4331136346c56dccfa18a92732c3b1 | move fields pushing to inForm | lib/components/mixins/ready.js | lib/components/mixins/ready.js | var isEqual = require('../../helpers/is-equal');
module.exports = {
ready: function() {
var inForm = this.inForm();
if (!this.$parent.options.sendOnlyDirtyFields)
this.$parent.fields.push(this);
if (inForm) {
if (this.$parent.options.sendOnlyDirtyFields) {
this.$watch('dirty', funct... | JavaScript | 0 | @@ -114,24 +114,45 @@
.inForm();%0A%0A
+ if (inForm) %7B%0A%0A
if (!thi
@@ -229,35 +229,16 @@
this);%0A%0A
- if (inForm) %7B%0A%0A
if
|
da0131fd6156831add9b048b0a15d0e77660b8d0 | Create separator for objects rendered by console.log | lib/console/console-message.js | lib/console/console-message.js | /* See license.txt for terms of usage */
"use strict";
var main = require("../main.js");
const { Cu } = require("chrome");
const { Trace, TraceError } = require("../core/trace.js");
const { Domplate } = require("../core/domplate.js");
const { Dom } = require("../core/dom.js");
const { Events } = require("../core/eve... | JavaScript | 0 | @@ -1602,24 +1602,64 @@
arentNode);%0A
+ this.appendSeparator(parentNode);%0A
%7D%0A%0A r
@@ -2508,24 +2508,136 @@
, e);%0A %7D%0A
+ %7D,%0A%0A appendSeparator: function(parentNode) %7B%0A let tag = SPAN(%22 %22);%0A return tag.append(%7B%7D, parentNode);%0A
%7D%0A%7D);%0A%0Afun
|
737d2a4c9c362bf206f4c9f410d1c3e53edf00ff | fix validateRecord | lib/dataTier/flow/flowModel.js | lib/dataTier/flow/flowModel.js | /*jshint node: true, -W106 */
'use strict';
/*
* Name : graphModel.js
* Module : Lib::DataTier::FlowModel
* Location : /lib/dataTier/flow
*
* History :
*
* Version Date Programmer Description
* =========================================================
* 0.0.1 2015-05-14 Filippo Rampado Init... | JavaScript | 0.000002 | @@ -1921,16 +1921,100 @@
index)%7B%0A
+%09if (this._filters === null)%7B%0A%09%09this._records%5Bindex%5D.norrisRecordIsValid = true;%0A%09%7D%0A
%09if (thi
@@ -2361,20 +2361,16 @@
%09%7D%0A%09%7D%0A%7D;
-
%0A%0AFlowMo
|
1ebedf51333b03034bd7818744473be7dd354399 | Update page-manipulation.js | src/page-manipulation.js | src/page-manipulation.js | (function($){
$(".layout__slot:nth-child(1)").attr("id","calendar-list");
$(".layout__slot:nth-child(2)").attr("id","app-list");
$(".layout__slot:nth-child(3)").attr("id","activity-list");
$(".layout__slot:nth-child(4)").attr("id","tweets-list");
$(".layout__slot:nth-child(4)").attr("id","tweets-list");
... | JavaScript | 0.000001 | @@ -331,16 +331,17 @@
st = $(%22
+#
app-list
|
4160dc89ba2e5a8efc1b081882bff67884670c54 | Fix minor error. | src/net/scripts.js | src/net/scripts.js | // Copyright 2012 Google Inc. All Rights Reserved.
/**
* @fileoverview Functions for dynamically loading scripts without blocking.
* By nesting multiple calls in callback parameters, execution order of
* the scripts can be preserved as well.
*
* Single script example:
* spf.net.scripts.load(url, function() {
* ... | JavaScript | 0.000003 | @@ -3910,16 +3910,20 @@
.onload(
+null
);%0A %7D
|
6a1f598be09a9eb8117f3ba02ab4071e9d2a0955 | Update strings.js | src/nls/strings.js | src/nls/strings.js | define(function (require, exports, module) {
"use strict";
module.exports = {
root: true,
it: true
};
});
| JavaScript | 0.000002 | @@ -111,16 +111,34 @@
it:
+ true,%0A de:
true%0A
|
93c6c0b1e78160a82c1dec746eaaf87c318315a5 | test wrong values | src/options.spec.js | src/options.spec.js | import test from 'tape'
import ChunkifyOptions from './options'
test('should throw when receiving non-object literal options', t => {
let WRONG_TYPES = [
false,
true,
null,
undefined,
[],
function() {}
];
for (let thing of WRONG_TYPES) {
t.throws(() => {
ChunkifyOptions.of(thin... | JavaScript | 0.000064 | @@ -1309,55 +1309,374 @@
%7D, /
-Expected 'chunk' to be 'number', got 'function'
+'chunk' should be a positive number/);%0A t.throws(() =%3E %7B%0A ChunkifyOptions.of(%7Bdelay%7D)%0A %7D, /'delay' should be a non-negative number/);%0A t.end()%0A%7D);%0A%0Atest('should throw when an option override has the wrong ... |
93713aabea145b5521ed7e27b88781e1f7a5297a | add export default | src/num2persian.js | src/num2persian.js | /**
*
* @type {string}
*/
const Delimiter = ' و ';
/**
*
* @type {string}
*/
const Zero = 'صفر';
/**
*
* @type {*[]}
*/
const Letters = [
['', 'یک', 'دو', 'سه', 'چهار', 'پنج', 'شش', 'هفت', 'هشت', 'نه'],
['ده', 'یازده', 'دوازده', 'سیزده', 'چهارده', 'پانزده', 'شانزده', 'هفده', 'هجده', 'نوزده', 'بیست'],
[... | JavaScript | 0.000002 | @@ -3003,12 +3003,39 @@
ring());%0A%7D;%0A
+export default Num2persian%0A
|
1181a8c82bd5a261319c64c4b93196e7967b353f | Update functions init template to latest deps. (#434) | lib/init/features/functions.js | lib/init/features/functions.js | 'use strict';
var chalk = require('chalk');
var fs = require('fs');
var RSVP = require('rsvp');
var spawn = require('cross-spawn');
var _ = require('lodash');
var logger = require('../../logger');
var prompt = require('../../prompt');
var enableApi = require('../../ensureApiEnabled').enable;
var requireAccess = requi... | JavaScript | 0 | @@ -1411,9 +1411,9 @@
: '~
-4
+5
.2.1
@@ -1453,11 +1453,11 @@
'%5E0.
-5.7
+6.2
'%0A
|
1cc57f6772de43a1420c14739367ed81f27af498 | Remove unused logger variable. | src/pat/sortable.js | src/pat/sortable.js | define([
"jquery",
"pat-registry"
"pat-logger",
"pat-parser"
], function($, patterns, logger, Parser) {
var log = logger.getLogger("pat.sortable"),
parser = new Parser("sortable");
parser.add_argument("selector");
var _ = {
name: "sortable",
trigger: ".pat-sortable"... | JavaScript | 0 | @@ -125,56 +125,8 @@
var
-log = logger.getLogger(%22pat.sortable%22),%0A
pars
|
b4dd9dad6df0ae84fb0ebf62de9a167fac2be9d3 | Update ng-prettyjson-tmpl.js | src/ng-prettyjson-tmpl.js | src/ng-prettyjson-tmpl.js | (function(angular) {
'use strict';
angular.module('ngPrettyJson')
.run(['$templateCache', function ($templateCache) {
$templateCache.put('ng-prettyjson/ng-prettyjson-panel.tmpl.html',
'<div>' +
'<button ng-click="edit()" ng-show="edition && !editActivated">Edit</button>' +
'<button ng-click="edit(... | JavaScript | 0.000004 | @@ -205,32 +205,46 @@
+ %0A '%3Cbutton
+ type=%22button%22
ng-click=%22edit(
@@ -303,32 +303,46 @@
' +%0A '%3Cbutton
+ type=%22button%22
ng-click=%22edit(
@@ -410,16 +410,30 @@
'%3Cbutton
+ type=%22button%22
ng-clic
|
06e032972f1b4d8ccfa15ed6d6cfb77fc820bdc1 | change proportion | src/objects/MapManager.js | src/objects/MapManager.js | //TO DESTROY LATER
const MaxLayer = 2
class MapManager {
constructor(map) {
this.removedBlock = [];
this.map = map;
}
findLayerToDestroy(x, y, lengthX, lengthY) {
let layerIndex = 0;
for(let index = 0; index < MaxLayer; index++) {
if( this.map.getTile(x, y, index) === null &&
th... | JavaScript | 0.000005 | @@ -534,34 +534,33 @@
const lengthY =
-10
+4
;%0A const leng
@@ -561,26 +561,25 @@
t lengthX =
-10
+4
;%0A //chec
@@ -745,24 +745,25 @@
= x; xAxis %3C
+=
lengthX; xA
@@ -803,16 +803,17 @@
yAxis %3C
+=
lengthY
@@ -1080,43 +1080,8 @@
x);%0A
- console.log(this.removedBlock)%0A
%7D%0A
@@ -1223,18 ... |
4ca9835f9a8979e1c8051c53623e664c2d39a1a2 | add description | Algorithms/JS/strings/firstUniqueCharacter.js | Algorithms/JS/strings/firstUniqueCharacter.js | firstUniqueCharacter.js
| JavaScript | 0.000004 | @@ -1,24 +1,269 @@
-firstUniqueCharacter.js
+// Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.%0A%0A// Examples:%0A%0A// s = %22leetcode%22%0A// return 0.%0A%0A// s = %22loveleetcode%22,%0A// return 2.%0A// Note: You may assume the string contain only... |
7a5679651cf226ce7abfc328dd2c734253ab81c3 | remove misleading comment | BowlingGame.js | BowlingGame.js | "use strict";
var assert = require('assert');
var add = function(x,y) { return x + y; };
var Game = function() {
this._pins = [];
this.roll = function(n) {
this._pins.push(n);
};
this._scoreSpare = function(i) {
return this._scoreFrame(i) + this._pins[i+2];
};
this._scoreFrame = functi... | JavaScript | 0 | @@ -882,24 +882,99 @@
%0A%09%7D%0A %7D;%0A%0A
+ var rollSpare = function(game) %7B%0A%09game.roll(5);%0A%09game.roll(5);%0A %7D;%0A%0A
it('roll
@@ -1329,45 +1329,24 @@
);%0A%09
-game.roll(5);%0A%09game.roll(5); // spare
+rollSpare(game);
%0A%09ga
|
59a28940ee7eda1ad8c9884f1fbf18c44ba55d22 | Remove leftover trace and fix block comment | lib/laws-filter/laws-filter.js | lib/laws-filter/laws-filter.js | /**
* Module dependencies.
*/
var Emitter = require('emitter');
var store = require('store')();
var laws = require('laws');
var citizen = require('citizen');
var merge = require('merge-util');
var t = require('t');
var type = require('type');
var _ = require('to-function');
var sorts = require('./sorts');
var log = ... | JavaScript | 0 | @@ -2484,44 +2484,31 @@
%0A *
-Save
+Gets
or
-retrieve current instance%0A *
+sets receiver's
sta
@@ -2792,41 +2792,8 @@
%7D%0A%0A
- log('state is now %25s', state);%0A
th
|
c2d834d83c363d6a5fa5cdf5e5e1158679b28408 | test for headroom react | src/pages/page-2/index.js | src/pages/page-2/index.js | import React, { PureComponent } from 'react'
import Link from 'components/Link'
import PropTypes from 'prop-types'
export default class Page2 extends PureComponent {
static propTypes = {
children: PropTypes.any,
}
render() {
const { children } = this.props
return (
<div>
<h1>Hi from th... | JavaScript | 0.000001 | @@ -417,16 +417,102 @@
%3C/Link%3E%0A
+ %3Cdiv style=%7B%7B marginTop: '2000px' %7D%7D%3E%0A %3Cdiv%3EFIN%3C/div%3E%0A %3C/div%3E%0A
%3C/
|
c3d0ca7aa3536868f5cba10dd00f4c9dca03b1ef | Add pad and truncate expression functions. | src/parsers/expression.js | src/parsers/expression.js | import {
ASTNode,
parse,
codegen,
functions as baseFunctions,
constants
} from 'vega-expression';
import {error, stringValue} from 'vega-util';
var Literal = 'Literal';
var Identifier = 'Identifier';
export var signalPrefix = '$';
export var scalePrefix = '%';
export var indexPrefix = '@';
export var even... | JavaScript | 0 | @@ -920,16 +920,72 @@
Format';
+%0A fn.pad = 'this.pad';%0A fn.truncate = 'this.truncate';
%0A%0A // c
|
52cb3e23f8e47699c8d8a41bd6133546c9fb69d8 | Allow projection type to be a signal. | src/parsers/projection.js | src/parsers/projection.js | import {error, isArray, isObject} from 'vega-util';
export default function(proj, scope) {
var params = {
type: proj.type || 'mercator'
};
for (var name in proj) {
if (name === 'name' || name === 'type') continue;
params[name] = parseParameter(proj[name], scope);
}
scope.addProjection(proj.name... | JavaScript | 0 | @@ -105,45 +105,8 @@
= %7B
-%0A type: proj.type %7C%7C 'mercator'%0A
%7D;%0A%0A
@@ -159,27 +159,8 @@
ame'
- %7C%7C name === 'type'
) co
|
344d52ede5792429debd5cbc42a1d1865cff8567 | Remove log | src/renderer/renderer.js | src/renderer/renderer.js | import {
WebGLRenderer, OrthographicCamera, Scene, Group, Vector3, Ray, Math as ThreeMath
} from "../../node_modules/three/build/three.module.js";
import MapRenderer from "./map-renderer.js";
import Tileset from "./tileset.js";
import { RenderObject } from "./object.js";
export { ObjectType } from "./object.js";
... | JavaScript | 0.000001 | @@ -3884,41 +3884,8 @@
dy);
-%0A console.log(worldDelta);
%0A%0A
|
056bf62e70084d0a4d0e91363f4563ec25d50b5f | Fix issue where a dojo-admin would not be able to use manage-event-us… (#163) | lib/perm/is-ticketing-admin.js | lib/perm/is-ticketing-admin.js | 'use strict';
var _ = require('lodash');
function isTicketingAdmin (args, cb) {
var seneca = this;
var plugin = args.role;
var userId, dojoId;
if(args.user) userId = args.user.id;
if (args.params) {
if(args.params.query) dojoId = args.params.query.dojoId;
if(args.params.eventInfo && _.isUndefined(d... | JavaScript | 0 | @@ -34,17 +34,46 @@
dash');%0A
+var async = require('async');
%0A
-
%0Afunctio
@@ -167,24 +167,44 @@
erId, dojoId
+, eventId, sessionId
;%0A if(args.
@@ -491,16 +491,222 @@
ery.id;%0A
+ if(args.params.query && _.isUndefined(dojoId)) eventId = args.params.query.eventId;%0A if(args.params.query && _.isUndefi... |
b5ceb5aea7398c07da477405f8ccf3ae11406000 | fix error _routes | lib/presentationTier/routes.js | lib/presentationTier/routes.js | /*jshint node: true, -W106 */
'use strict';
/*
* Name : socket.js
* Module : Lib::PresentationTier::Routes
* Location : /lib/presentationTier
*
* History :
*
* Version Date Programmer Description
* =========================================================
* 0.0.1 2015-05-20 Matteo Furlan ... | JavaScript | 0.000001 | @@ -891,16 +891,8 @@
his.
-_routes.
addR
|
57e743713a4a86d8c228b24b3be40cbf8bcd768b | Fix add Operation | src/resource/resource.js | src/resource/resource.js | Vue.component('api-resource', {
props: ['key', 'path', 'index'],
computed: {
sanitisePath : function() {
return 'resource_'+this.index.split('/').join('').split('{').join('').split('}').join('');
},
pathEntry : {
get : function() {
return this.index
... | JavaScript | 0.000002 | @@ -957,16 +957,28 @@
ummary =
+ template &&
templat
@@ -1026,16 +1026,28 @@
iption =
+ template &&
templat
@@ -1098,16 +1098,28 @@
meters =
+ template &&
templat
@@ -1170,16 +1170,28 @@
tionId =
+ template &&
templat
|
777b0ff1e561ecacf0835f752f45989728ab20fc | Use properties where it makes sense | embark-ui/src/containers/ApplicationPreviewContainer.js | embark-ui/src/containers/ApplicationPreviewContainer.js | import React from 'react';
class ApplicationPreviewContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
previewUrl: 'http://localhost:8000'
};
}
render() {
return (
<div>
<div className="input-group mb-3">
<input type="text" classNa... | JavaScript | 0.000005 | @@ -1,8 +1,44 @@
+import PropTypes from 'prop-types';%0A
import R
@@ -188,43 +188,126 @@
-previewUrl: 'http://loc
+// TODO(andremedeiros): Figure out how to pull this from the actu
al
+
host
-:8000'
+.%0A previewUrl: this.props.previewHomepage
%0A
@@ -910,31 +910,36 @@
src=
-%22http://localhost:8000... |
8aa66e20badf947f3d4698d2cadb578ed65344cf | Fix in SurfaceManager. | editor/SurfaceManager.js | editor/SurfaceManager.js | import { platform, isArrayEqual, getKeyForPath } from '../util'
const DEBUG = false
export default class SurfaceManager {
constructor (editorState) {
this.editorState = editorState
this.surfaces = new Map()
editorState.addObserver(['selection', 'document'], this._onSelectionOrDocumentChange, this, { st... | JavaScript | 0 | @@ -3016,32 +3016,54 @@
Ranges()%0A
+ const activeElement =
window.document
@@ -3080,15 +3080,78 @@
ment
-.blur()
+%0A if (activeElement) %7B%0A activeElement.blur()%0A %7D
%0A
|
85ce486246d48ecd36079fa3f6a7503ce728995c | Add a dmmd-preview-stale css class when preview is stale; #444 | resources/dmmd-preview.js | resources/dmmd-preview.js | $(function () {
window.register_dmmd_preview = function ($preview) {
var $update = $preview.find('.dmmd-preview-update');
var $content = $preview.find('.dmmd-preview-content');
var preview_url = $preview.attr('data-preview-url');
var $textarea = $('#' + $preview.attr('data-textarea-i... | JavaScript | 0 | @@ -703,16 +703,50 @@
ontent')
+.removeClass('dmmd-preview-stale')
;%0A%0A
@@ -2699,32 +2699,89 @@
, function () %7B%0A
+ $preview.addClass('dmmd-preview-stale');%0A
|
b8bfe8d5edb140b61ed03fae646fe7519d4700f4 | modify view state of hydrator detail to hydrator++ detail view | cdap-ui/app/features/hydrator/services/create/actions/config-actions.js | cdap-ui/app/features/hydrator/services/create/actions/config-actions.js | /*
* Copyright © 2015 Cask Data, Inc.
*
* 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 or agreed t... | JavaScript | 0 | @@ -3430,16 +3430,24 @@
hydrator
+plusplus
.detail'
|
7618334db8a60b9c8f7f9ef71f5ed0cf5a0343f5 | Use helper function for casting to string in PHP-compatible way | src/php/strings/substr.js | src/php/strings/substr.js | module.exports = function substr (str, start, len) {
// discuss at: https://locutus.io/php/substr/
// original by: Martijn Wieringa
// bugfixed by: T.Wild
// improved by: Onno Marsman (https://twitter.com/onnomarsman)
// improved by: Brett Zamir (https://brett-zamir.me)
// revised by: Theriault (https://g... | JavaScript | 0 | @@ -1313,17 +1313,133 @@
%0A%0A
-str += ''
+var _php_cast_string = require('../_helpers/_phpCastString') // eslint-disable-line camelcase%0A%0A str = _php_cast_string(str)%0A
%0A v
@@ -1500,16 +1500,49 @@
ni_get')
+ // eslint-disable-line camelcase
%0A var s
|
cf4e24496e311fae6ce7fbd6fa68518d4804a0e0 | Fix home link | lib/share/components/header.js | lib/share/components/header.js | import React, { Component, PropTypes } from 'react'
import { Link } from 'react-router'
import styles from './header.css'
export default class Header extends Component {
static propTypes = {
loginUser: PropTypes.string.isRequired,
}
static defaultProps = {
loginUser: 'DUMMY_USER',
}
render = () =>... | JavaScript | 0.000001 | @@ -518,25 +518,26 @@
%3C
-a href=%22#
+Link to=%22/
%22%3Elogo%3C/
a%3E%0A
@@ -532,17 +532,20 @@
%22%3Elogo%3C/
-a
+Link
%3E%0A
|
a4699ace30729f44e5312b19fd4aae96221f451e | add init function | src/sap/a/map/MapView.js | src/sap/a/map/MapView.js | import View from "../view/View";
export default class MapView extends View
{
metadata = {
properties: {
defaultCenterLocation: {
type: "object",
defaultValue: [ 32.04389, 118.77881 ]
},
defaultZoom: {
type: "int",
defaultValue: 15
},
minZoom: {
type: "int",
defa... | JavaScript | 0.000011 | @@ -822,28 +822,27 @@
oomControl:
-fals
+tru
e,%0A%09%09%09attrib
@@ -1175,24 +1175,24 @@
, options);%0A
-
L.ti
@@ -1262,24 +1262,483 @@
ap);%0A %7D%0A%0A
+ getCenterLocation()%0A %7B%0A return this.getCenterLocation();%0A %7D%0A%0A setCenterLocation(centerLocation, zoom, options)%0A... |
eb55162b6efb8bd3b70d4fdcdb793c9a9a5d2566 | take care of undefined case | src/schema/schemautil.js | src/schema/schemautil.js | 'use strict';
var schemautil = module.exports = {},
util = require('../util');
var isEmpty = function(obj) {
return Object.keys(obj).length === 0;
};
schemautil.extend = function(instance, schema) {
return schemautil.merge(schemautil.instantiate(schema), instance);
};
// instantiate a schema
schemautil.instan... | JavaScript | 0.998391 | @@ -356,16 +356,75 @@
l;%0A if
+(schema === undefined) %7B%0A return undefined;%0A %7D else if
('defaul
|
837ec45e8c8e5716f979e86550cdeb010fca678a | Add modules selector | src/selectors/modules.js | src/selectors/modules.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
export const selectUsingSupplierCredits = ({ modules }) => {
const { usingSupplierCredits } = modules;
return usingSupplierCredits;
};
| JavaScript | 0.000001 | @@ -199,8 +199,127 @@
its;%0A%7D;%0A
+%0Aexport const selectUsingPayments = (%7B modules %7D) =%3E %7B%0A const %7B usingPayments %7D = modules;%0A return usingPayments;%0A%7D;%0A
|
34a5f915a1adb82fc50123b142df8002f1424761 | move summaryLocaleData to inner func | src/server/i18n/index.js | src/server/i18n/index.js | // @flow
import {readFileSync} from 'fs' // readFile
import path from 'path'
import {sync as globSync} from 'glob'
// import {addLocaleData} from 'react-intl'
import enLocaleData from 'react-intl/locale-data/en'
import ruLocaleData from 'react-intl/locale-data/ru'
import type {i18nConfigObject} from 'types'
const tran... | JavaScript | 0.000003 | @@ -598,76 +598,8 @@
%7D)%0A%0A
-const summaryLocaleData = %7B%0A%09en: enLocaleData,%0A%09ru: ruLocaleData%0A%7D%0A%0A
expo
@@ -706,16 +706,34 @@
: string
+ = defaultLanguage
): i18nC
@@ -758,21 +758,73 @@
cons
-ole.log(lang)
+t summaryLocaleData = %7B%0A%09%09en: enLocaleData,%0A%09%09ru: ruLocaleData%0A%09%7D
... |
38344f76cdad6016a6c396555d66f946439424f0 | fix lint | src/service/api/index.js | src/service/api/index.js | import {isEqual} from 'lodash'
import Action from '../../action'
import {http, websocket} from './network'
import Codec from './codec'
export default function API(getState, dispatch, next) {
return {
async fetchUser() {
const user = await http('GET', '/api/user/userinfo')
next(Action.User.profile.cr... | JavaScript | 0.000013 | @@ -1743,33 +1743,33 @@
it http('POST',
-%60
+'
/api/channel/upd
@@ -1779,17 +1779,17 @@
NextSong
-%60
+'
, %7B%0A
@@ -2034,33 +2034,33 @@
it http('POST',
-%60
+'
/api/channel/fin
@@ -2064,17 +2064,17 @@
finished
-%60
+'
,%0A
@@ -2287,33 +2287,33 @@
it http('POST',
-%60
+'
/api/channel/dow
@@ -23... |
468f293ee61b6941a917a433a2b092f8bb327404 | fix modalStore bug | src/stores/modalStore.js | src/stores/modalStore.js | import { computed, observable, action } from 'mobx';
import { omitBy, reduce } from 'lodash';
class ModalStore {
@observable modalProps = {};
@observable state = {};
_prefix = '__';
getOmitPaths = (val, key) => {
return key.startsWith(this._prefix);
};
@computed
get name() {
return this.state.name;
}
... | JavaScript | 0 | @@ -1281,32 +1281,37 @@
%09%09%7D%0A
+%0A
%09%09
-router.history.listen(
+const handleQueryChange =
(%7B q
@@ -1598,16 +1598,98 @@
%09%09);%0A%09%09%7D
+;%0A%0A%09%09router.history.listen(handleQueryChange);%0A%09%09handleQueryChange(router.location
);%0A%0A%09%09th
|
3f88bd2db871a8ecdf707d1fbccc98e034bc0a78 | Remove dependency on react-native-match-media | src/styles/animations.js | src/styles/animations.js | import { Animated, Easing } from 'react-native-universal'
import matchMedia from 'react-native-match-media'
import { Breakpoints } from './Grid'
export const Curves = {
standard: Easing.bezier(0.4, 0, 0.2, 1),
deceleration: Easing.bezier(0, 0, 0.2, 1),
acceleration: Easing.bezier(0.4, 0, 1, 1),
sharp: Easing.... | JavaScript | 0.000262 | @@ -54,58 +54,8 @@
sal'
-%0Aimport matchMedia from 'react-native-match-media'
%0A%0Aim
@@ -1150,24 +1150,31 @@
ed it%0A if (
+global.
matchMedia(d
@@ -1301,16 +1301,23 @@
e%0A if (
+global.
matchMed
|
7f76491d8ce204ae70b4f9af2290bb6789842b11 | Remove beforeunload event on component destroyed. | resources/assets/js/mixins/promptToSaveMixin.js | resources/assets/js/mixins/promptToSaveMixin.js | /**
* Mixin to display a suitable modal dialog to either allow navigating away from a page with unsaved changes
* or to cancel and stay on that page.
*
* The component using this mixin MUST:
* - Be a route-level component (used as part of a route) as the beforeRoute* callbacks only get called for these components.... | JavaScript | 0 | @@ -1160,16 +1160,107 @@
);%0A%09%7D,%0A%0A
+%09destroyed() %7B%0A%09%09window.removeEventListener('beforeunload', this.promptToSaveWindow);%0A%09%7D,%0A%0A
%09data()
|
b60a455efb11c65a2654fa23f7bec6bc929449d9 | add help text to counter field | client/mobrender/widgets/adjustments/component.js | client/mobrender/widgets/adjustments/component.js | /**
* AdjustmentsForm
*
* Um componente para para submeter formulários de ajustes de widgets.
*/
import React from 'react'
import PropTypes from 'prop-types'
import {
FormGroup,
ControlLabel,
FormControl,
ColorPicker,
HelpBlock
} from '~client/components/forms'
import { SettingsForm } from '~client/ux/com... | JavaScript | 0.000001 | @@ -1774,32 +1774,118 @@
am.'%0A /%3E%0A
+ %3CHelpBlock%3EO contador ser%C3%A1 mostrado se existir um texto definido.%3C/HelpBlock%3E%0A
%3C/FormGrou
|
1a865895e8582181cf4820fbab1f90af681f285d | fix ground position | client/pages/examples/threejs/collisions/index.js | client/pages/examples/threejs/collisions/index.js | import React from 'react'
import * as THREE from 'three'
import * as OIMO from 'oimo'
import Example from '-/components/example'
import notes from './readme.md'
let rand = Math.random
const init = ({ canvas, container }) => {
let renderer = new THREE.WebGLRenderer({ canvas })
let scene = new THREE.Scene()
cons... | JavaScript | 0.00004 | @@ -813,18 +813,20 @@
ze:%5B50,
-1
0
+.01
, 50%5D, p
@@ -959,338 +959,179 @@
);%0A
+%0A
-scene.add( gridHelper );%0A gridHelper.position.copy(ground.getPosition())%0A%0A renderer.setSize(container.clientWidth, container.clientWidth)%0A const geometry = new THREE.BoxGeometry(1, 1, 1)%0A const material = ne... |
fc124c21ebb31449d2e8f755a7b10e28c4e5bd13 | Update index.js | apps/robot/index.js | apps/robot/index.js | 'use strict';
module.change_code = 1;
var alexa = require("alexa-app");
var gcm = require("node-gcm");
var app = new alexa.app("robot");
const gcmServerKey = process.env.GCM_SERVER_KEY;
const registrationToken = process.env.REGISTRATION_TOKEN;
var sender = new gcm.Sender(gcmServerKey);
var registrationTokens = [reg... | JavaScript | 0.000002 | @@ -1336,16 +1336,18 @@
%22: %5B%0A
+//
%22%7Btoggl
@@ -1369,19 +1369,16 @@
ts%22%0A
- //
%22red on
@@ -1927,32 +1927,34 @@
// %7B%0A
+//
console.log(da
@@ -1994,16 +1994,22 @@
ing red
+L E D
light on
|
8d3a9180086e7eed5c6059c3a841ab6678366586 | Remove unused function. | compassion.counterfeiter/counterfeiter.generic.js | compassion.counterfeiter/counterfeiter.generic.js | module.exports = function (Colleague, Conduit) {
var cadence = require('cadence')
var abend = require('abend')
var Destructor = require('destructible')
var Colleague = require('../compassion.colleague/colleague')
var Kibitzer = require('kibitz')
var Conduit = require('../compassion.conduit/condu... | JavaScript | 0 | @@ -3338,874 +3338,8 @@
%7D)%0A%0A
- Counterfeiter.prototype._join = cadence(function (async, options) %7B%0A interrupt.assert(!this.destroyed, 'destroyed', this._destructible.errors%5B0%5D)%0A // TODO Fold UserAgent into Counterfeiter.%0A var denizen = this._denizens%5Boptions.id%5D = new Deni... |
51593b02ceef46cb95a47df4962ae5d0b57d5400 | fix switchPrevious selector | src/reducers/selectors.js | src/reducers/selectors.js | export const getComicManager = (state) => state.comics.comicManager;
export const getChapters = (state) => state.comics.chapters;
export const getNextChapterIndex = (chapters, cid) => {
var index = chapters.findIndex(item => cid == item.cid);
if (index != 0 && index-1 > -1) {
return index - 1;
} else {
return -... | JavaScript | 0 | @@ -486,18 +486,16 @@
s.length
--1
) %7B%0A%09%09re
|
fd5657c76a3015c9efd27f960280735304d37a65 | remove raf from onRender | src/render/dom/element.js | src/render/dom/element.js | import create from './create'
import { findParent, isFragment } from '../fragment'
import { tag } from '../../get'
import parent from './parent'
const createStatic = create.static
const createState = create.state
// check for null as well -- move this to get
const getRemove = t => t.remove || t.inherits && getRemove(... | JavaScript | 0.000001 | @@ -2113,43 +2113,8 @@
- global.requestAnimationFrame(() =%3E
t.e
@@ -2154,17 +2154,16 @@
te: s %7D)
-)
%0A %7D
|
77b2e527f02916ef8cca748308b463ff83421473 | correct mistakes | askomics/static/js/link/AskomicsPositionableLink.js | askomics/static/js/link/AskomicsPositionableLink.js | /*jshint esversion: 6 */
class AskomicsPositionableLink extends AskomicsLink {
constructor(uriL,sourceN,targetN) {
super(uriL,sourceN,targetN);
this.type = 'included' ;
this.label = 'included in';
this.sameTax = true ;
this.sameRef = true ;
this.strict = true ;
}
setjson(o... | JavaScript | 0.999954 | @@ -917,35 +917,35 @@
I'+node.SPARQLid
-+%22
+, %22
:position_taxon
@@ -935,33 +935,36 @@
%22:position_taxon
-
+%22, %22
?taxon_%22+node.SP
@@ -1018,35 +1018,35 @@
I'+node.SPARQLid
-+%22
+, %22
:position_ref ?r
@@ -1038,25 +1038,28 @@
position_ref
-
+%22, %22
?ref_%22+node.
@@ -1122,35 +1122,35 @@
ondNode... |
0be3dbbc55d2dfab76d57328d4a0683bb82d3fb5 | Send Content-Length with API requests. | ext/chat.js | ext/chat.js | var irc = require('irc');
var http = require('http');
var urllib = require('url');
var querystring = require('querystring');
(function checkConfig() {
var i;
var error = false;
var requiredConfigs = ['CT_IRC_SERVER', 'CT_IRC_NICK', 'CT_IRC_CHANNELS',
'CT_API_URL'];
for (i = 0; i < req... | JavaScript | 0 | @@ -952,16 +952,65 @@
rCase();
+%0A opts.headers = %7B%0A 'Content-Length': 0,%0A %7D;
%0A%0A res
|
52cea5a46ca9bed8b53fd95a5afa64431f0a511c | Fix chunkname | src/routes/login/index.js | src/routes/login/index.js | import React from 'react';
import Layout from '../../components/Layout';
import Login from './Login';
const title = 'Log In';
function action({ store }) {
const { user } = store.getState();
if (user) {
return { redirect: '/login' };
}
return {
chunks: ['login'],
title,
component: (
<Layo... | JavaScript | 0.001233 | @@ -265,21 +265,21 @@
unks: %5B'
-login
+users
'%5D,%0A
|
20cdc3f1fbeec5431931ccf070ce1fb62746e25b | update docs | docs/layout/assets/app.js | docs/layout/assets/app.js | // stateless components
function Content (props) {
return h('div.content', {dangerouslySetInnerHTML: props.html});
}
function TableOfContents (props) {
return h('.table-of-contents',
h('ul',
props.nav.map(function (value) {
return h('li',
h('a[href='+ value.href +']',
{
... | JavaScript | 0.000001 | @@ -74,23 +74,9 @@
', %7B
-dangerouslySetI
+i
nner
|
de01a97d11b11f4aaea80af513c85423ec0cbbad | change pattern for info: logout seneca action | server/concorda-client.js | server/concorda-client.js | 'use strict'
const _ = require('lodash')
let options = {name: 'concorda'}
// Hapi Plugin for wiring up Concorda
module.exports = function (server, opts, next) {
// Set up our seneca plugins
let seneca = server.seneca
options = _.extend({}, opts, options)
seneca.add('role: ' + options.name + ', cmd: closeSes... | JavaScript | 0 | @@ -304,25 +304,20 @@
',
-cmd
+info
:
-c
lo
-seSession
+gout
', f
|
4e795885787e231e24033bf8e80bf03ebeb5b8af | set resave to false in passport | server/config/passport.js | server/config/passport.js | "use strict";
var passport = require('passport');
var session = require('express-session');
var pg = require('pg');
var pgSession = require('connect-pg-simple')(session);
var uuid = require('node-uuid');
var cookieParser = require('cookie-parser');
var Strate... | JavaScript | 0.000051 | @@ -736,19 +736,20 @@
resave:
-tru
+fals
e,%0A s
@@ -770,11 +770,12 @@
ed:
-tru
+fals
e%0A
@@ -1345,8 +1345,9 @@
rat);%0A%7D;
+%0A
|
eb51d5d8070eb47b9d4a338e744d68b61afa2ea6 | Add missing namespacing | src/rules/percent-placeholder-pattern/index.js | src/rules/percent-placeholder-pattern/index.js | import { isRegExp, isString } from "lodash"
import resolveNestedSelector from "postcss-resolve-nested-selector"
import { utils } from "stylelint"
import {
hasInterpolatingAmpersand,
isStandardRule,
isStandardSelector,
parseSelector,
} from "../../utils"
export const ruleName = "percent-placeholder-pattern"
ex... | JavaScript | 0.006429 | @@ -234,16 +234,29 @@
lector,%0A
+ namespace,%0A
%7D from %22
@@ -293,16 +293,26 @@
eName =
+namespace(
%22percent
@@ -332,16 +332,17 @@
pattern%22
+)
%0A%0Aexport
@@ -1313,22 +1313,16 @@
eturn %7D%0A
-
%0A /
@@ -2401,9 +2401,8 @@
%0A%0A %7D%0A%7D%0A
-%0A
|
c9903ee90b9c0723e67d00092a251dbf1a764bd8 | Revert "One more dir to be cleaned by WAFD cleaner" | src/scripts/browser/components/wafd-cleaner.js | src/scripts/browser/components/wafd-cleaner.js | import {app} from 'electron';
import path from 'path';
import del from 'del';
const paths = [
path.join(app.getPath('desktop'), 'WhatsApp for Desktop.lnk'),
path.join(app.getPath('desktop'), 'WhatsApp.lnk'),
path.join(app.getPath('desktop'), 'Unofficial WhatsApp for Desktop.lnk'),
path.join(app.getPath('deskto... | JavaScript | 0 | @@ -1038,72 +1038,8 @@
'),%0A
- path.join(app.getPath('appData'), '..', 'Local', 'whatsapp'),%0A
pa
|
1b640f87a3a482ee628d4f7cfdcbb50395258f60 | Change reference to phantomjs package | src/services/account/strategies/itslearning.js | src/services/account/strategies/itslearning.js | 'use strict';
const logger = require('winston');
const promisify = require('es6-promisify');
const errors = require('feathers-errors');
const path = require('path');
const childProcess = require('child_process');
const execFile = promisify(childProcess.execFile);
const phantomjs = require('phantomjs');
const binPath = ... | JavaScript | 0 | @@ -293,16 +293,25 @@
hantomjs
+-prebuilt
');%0Acons
|
2290d22bd45bc5172bdd5595a9b8a644b8f39dc9 | update copyright dates from daily grunt work | js/MutableOptionsNode.js | js/MutableOptionsNode.js | // Copyright 2017-2021, University of Colorado Boulder
/**
* Assists "changing" options for types of nodes where the node does not support modifying the option.
* This will create a new copy of the node whenever the options change, and will swap it into place.
*
* Given a type that has an option that can only be p... | JavaScript | 0 | @@ -14,17 +14,17 @@
2017-202
-1
+2
, Univer
|
e72f75636be0c9038dd66692d3ec2dee17983b5a | debug wechat | js/WeiXinJsSdkWrapper.js | js/WeiXinJsSdkWrapper.js |
var WeiXinJsSdkWrapper = (function($, Hashes, wx, zHelper, ParseJsGlobalCache){
//TODO(zzn): to be replaced by a real secret after development.
var CONST_APPID = "wx4bf3130f55a3352d";
var CONST_APPSECRET = "d15f5121f0047d288f1ba81dd0fe7cca";
var CACHE_DB_NAME = "AuthCache";
var ACCESS_TOKEN_CACHE_K... | JavaScript | 0.000001 | @@ -4528,25 +4528,12 @@
ug:
-zHelper.isDebug()
+true
, //
|
1940b7f7682b1f4fd4fa05eb9391278df76f519c | Add Andrew's UTM codes | root/src/js/lib/social.js | root/src/js/lib/social.js | var Share = require("./share.min.js");
new Share(".share", {
ui: {
flyout: "bottom left"
},
networks: {
email: {
description: window.location.href
}
}
});
| JavaScript | 0.000002 | @@ -37,146 +37,728 @@
);%0A%0A
-new Share(%22.share%22, %7B%0A ui: %7B%0A flyout: %22bottom left%22%0A %7D,%0A networks: %7B%0A email: %7B%0A description: window.location.href%0A %7D%0A %7D%0A%7D
+var addQuery = function(url, query) %7B%0A var joiner = url.indexOf(%22?%22) %3E -1 ? %22&%22 : %22?%22... |
cd785de7aca2d4e6044daeaa958bb7f0bc77432f | Load current permission user edit | js/adminEditViewModel.js | js/adminEditViewModel.js | function pageViewModel(gvm) {
// Page specific i18n bindings
gvm.title = ko.computed(function(){i18n.setLocale(gvm.lang()); return gvm.app() + ' - ' + i18n.__("AdminEditPage");}, gvm);
gvm.pageHeaderEditUser = ko.computed(function(){i18n.setLocale(gvm.lang()); return i18n.__("UserEditTitle");}, gvm);
g... | JavaScript | 0.000001 | @@ -1184,32 +1184,39 @@
= ko.observable(
+%22GUEST%22
);%0A gvm.avail
|
88219de90b9c052ad57aac7e091dce3050f2ecc8 | Replace log with error | js/app/engine/ui/Menu.js | js/app/engine/ui/Menu.js | define([
'engine/graphics/DisplayObject',
'./UiEventType'
],
function(
DisplayObject,
UiEventType
) {
'use strict';
/**
* @type {string}
*/
var BACKGROUND_COLOR = '#000000';
/**
* @type {string}
... | JavaScript | 0.998854 | @@ -4146,66 +4146,60 @@
-console.log('COULD NOT FOCUS A MENU ITEM: NO ITEMS ADDED')
+throw 'Could not focus a menu item: no items added!'
;%0A
|
a9e661a2b5cc96e2148d62fa5ccd41522197ceef | read data options in constructor for collapse | js/bootstrap-collapse.js | js/bootstrap-collapse.js | /* =============================================================
* bootstrap-collapse.js v2.2.3
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "Lic... | JavaScript | 0 | @@ -3698,16 +3698,67 @@
ptions =
+ $.extend(%7B%7D, $.fn.collapse.defaults, $this.data(),
typeof
@@ -3785,16 +3785,17 @@
& option
+)
%0A i
|
c7b5f85806ba6fc4123cc58c26f6ff000a2a9aa6 | Update the API to https as github does not all http | js/common/dataFactory.js | js/common/dataFactory.js | (function(){
var dataFactory = function($http){
var url = "http://gateway-a.watsonplatform.net/calls/text/TextGetEmotion";
var APIkey = "4d395301e1cf0abcae8548dfa07cfdad2b96f24c";
var confParam = "&outputMode=json&showSourceText=1&text=";
return {
getText: function(callbac... | JavaScript | 0.000007 | @@ -68,16 +68,17 @@
= %22http
+s
://gatew
|
21c32c9fe49dc9fe507f88af8aeda941056bd123 | Update map key (uppercase to lowercase) | js/components/map-key.js | js/components/map-key.js | import React, { Component } from 'react'
import pureRender from 'pure-render-decorator'
import { magnitudeToRadius, depthToColor } from '../earthquake-properties'
import OverlayButton from './overlay-button'
import log from '../logger'
import '../../css/map-key.less'
import '../../css/modal-style.less'
@pureRender
ex... | JavaScript | 0 | @@ -2069,17 +2069,17 @@
inental
-C
+c
onvergen
@@ -2072,33 +2072,33 @@
ntal convergent
-B
+b
oundary%3C/td%3E%3C/tr
@@ -2166,17 +2166,17 @@
inental
-T
+t
ransform
@@ -2168,33 +2168,33 @@
ental transform
-F
+f
ault%3C/td%3E%3C/tr%3E%0A
@@ -2263,14 +2263,14 @@
tal
-R
+r
ift
-B
+b
ound
@@ -2346,17 +2346,... |
a393654cd59cbc5d839c60a3c3819abbb2328ab7 | Add error message on wallet import while the wallet is already open | js/controllers/import.js | js/controllers/import.js | 'use strict';
angular.module('copayApp.controllers').controller('ImportController',
function($scope, $rootScope, walletFactory, controllerUtils, Passphrase) {
$scope.title = 'Import a backup';
var reader = new FileReader();
var _importBackup = function(encryptedObj) {
Passphrase.getBase64Async($sco... | JavaScript | 0 | @@ -807,24 +807,300 @@
pe.wallet);%0A
+ $rootScope.wallet.on('connectionError', function() %7B%0A var message = %22Looks like you are already connected to this wallet, please logout from it and try importing it again.%22;%0A $rootScope.$flashMessage = %7B message: message, type: 'error'%7D;%0A... |
034312d3586547d57e5f6878c08c7f67beaa7b39 | Rename showSearchCount_. | js/controllers/search.js | js/controllers/search.js | /**
* @constructor
*/
function SearchController(search) {
this.search_ = search;
$('#search-button').click(this.onSearchButton_.bind(this));
$('#search-input').bind('input', this.onChange_.bind(this));
$('#search-input').keydown(this.onKeydown_.bind(this));
$('#search-next-button').click(this.onFindNext_.b... | JavaScript | 0 | @@ -479,20 +479,22 @@
ototype.
-show
+update
SearchCo
|
2b1dc7280f7e8be28eb7b1ca583212e4ac25be88 | Update enderecoController.js | js/enderecoController.js | js/enderecoController.js | app.controller('enderecoController', function ($scope, $http, toastr) {
$scope.Endereco = {
id: 0,
logradouro: '',
numero: '',
complemento: '',
bairro: '',
cidade_id: 0,
cidadeName: '',
cep: 0,
latitude: 0,
longetude: 0,
ponto_r... | JavaScript | 0 | @@ -1014,32 +1014,357 @@
ndereco = false;
+%0A%0A $scope.EnderecoAdd = %7B%0A id: 0,%0A logradouro: '',%0A numero: '',%0A complemento: '',%0A bairro: '',%0A cidade_id: 0,%0A cidadeName: '',%0A cep: 0,%0A latitude:... |
f05accb2f5c836e8d992006ad06b5bfdf705f37a | add unit test | src/web_client/test/unit/specs/sidebar.spec.js | src/web_client/test/unit/specs/sidebar.spec.js | /*
import dependencies
*/
import Vue from 'vue'
import Sidebar from '@/components/Sidebar'
import ElementUI from 'element-ui'
import VueResource from 'vue-resource'
import VueLocalStorage from 'vue-localstorage'
import VueRouter from 'vue-router'
/*
inject dependencies
*/
Vue.use(ElementUI)
Vue.use(VueLocalStorage)
... | JavaScript | 0 | @@ -240,16 +240,68 @@
-router'
+%0Aimport %7B EventBus %7D from '@/components/EventBus.js'
%0A%0A/*%0Ainj
@@ -451,16 +451,240 @@
) =%3E %7B%0A%0A
+ it('should successfully listen to event', () =%3E %7B%0A const vm = new Vue(Sidebar).$mount()%0A EventBus.$emit('hideSidebar', %7B%0A progres... |
ff1c302ab2bd05129d13c4a6520f670632e6fb37 | initialize MediaQuery in global Foundation entry | js/entries/foundation.js | js/entries/foundation.js | import $ from 'jquery';
import { Foundation } from '../foundation.core';
import * as CoreUtils from '../foundation.core.utils';
import { Box } from '../foundation.util.box'
import { onImagesLoaded } from '../foundation.util.imageLoader';
import { Keyboard } from '../foundation.util.keyboard';
import { MediaQuery } fro... | JavaScript | 0.000005 | @@ -2488,16 +2488,36 @@
dation);
+%0AMediaQuery._init();
%0A%0AFounda
|
d99ea4d427899c02fb97373a26fe7c803bd72507 | Fix memento demo. | js/foam/demos/Memento.js | js/foam/demos/Memento.js | /**
* @license
* Copyright 2015 Google Inc. All Rights Reserved.
*
* 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 requir... | JavaScript | 0 | @@ -871,16 +871,47 @@
.JSView'
+,%0A 'foam.ui.StringArrayView'
%0A %5D,%0A%0A
|
4f4cfa838cdb2d81455cf031b7485789d26d4629 | change job getType to getJobType and add getType method that returns job so that job references can be properly built | js/gitana/cluster/Job.js | js/gitana/cluster/Job.js | (function(window)
{
var Gitana = window.Gitana;
Gitana.Job = Gitana.AbstractClusterObject.extend(
/** @lends Gitana.Job.prototype */
{
/**
* @constructs
* @augments Gitana.AbstractClusterObject
*
* @class Job
*
* @param {Gitana.Cluster} ... | JavaScript | 0 | @@ -975,16 +975,19 @@
get
+Job
Type: fu
@@ -1046,32 +1046,135 @@
%22);%0A %7D,%0A%0A
+ getType: function()%0A %7B%0A return Gitana.TypedIDConstants.TYPE_JOB;%0A %7D,%0A%0A
/**%0A
|
f6506869907fab885713082ef5fb930776b500f7 | Add method to get/set 'socketDisabled' property of a port in module-unit | js/models/module-unit.js | js/models/module-unit.js | (function(app) {
'use strict';
var helper = app.helper || require('../helper.js');
var ModuleUnit = function(props) {
this.module = props.module;
this.port = props.port;
};
ModuleUnit.prototype.equal = function(other) {
if (!other)
return false;
return Object.keys(this).every(function... | JavaScript | 0 | @@ -578,32 +578,144 @@
d(value);%0A %7D;%0A%0A
+ ModuleUnit.prototype.portSocketDisabled = function(value) %7B%0A return this.port.socketDisabled(value);%0A %7D;%0A%0A
ModuleUnit.pro
|
09734bac7e16fd0a71289f207a7d98339fd92769 | Remove unnecessary frame callback function | js/popcorn.responsive.js | js/popcorn.responsive.js | (function (Popcorn) {
'use strict';
var instances = {},
resizeTimeout,
lastResize = 0,
windowWidth = 0,
windowHeight = 0,
RESIZE_THROTTLE = 30;
function resize(popcorn) {
var instance = instances[popcorn.id],
list,
videoAspect,
windowAspect,
options,
video,
scale,
min,
clipD... | JavaScript | 0.000006 | @@ -4083,133 +4083,8 @@
%09%7D,%0A
-%09%09%09frame: function () %7B%0A%09%09%09%09/*%0A%09%09%09%09only update if this is the highest-priority active instance%0A%09%09%09%09that matches%0A%09%09%09%09*/%0A%09%09%09%7D,%0A
%09%09%09e
|
eb83c86eedd594f79f21b2e334187a4d752fa75a | update tests for new asset handling | packages/spec/serve.spec.js | packages/spec/serve.spec.js | /* eslint-env node, jest */
var fs = require('fs');
var path = require('path');
var rimraf = require('rimraf');
var mkdirp = require('mkdirp');
var fetch = require('isomorphic-fetch');
var originalDir = process.cwd();
var appDir = path.resolve(__dirname, 'fixtures', 'integration');
var buildDir = path.resolve(appDir... | JavaScript | 0.000001 | @@ -1310,33 +1310,43 @@
%7B%0A
-assetsByChunkName
+entrypoints: %7B%0A main
: %7B%0A
@@ -1341,36 +1341,84 @@
main: %7B%0A
+
-main
+chunks: %5B'vendors~main', 'main'%5D,%0A assets
: expect.any(Arr
@@ -1414,32 +1414,43 @@
ect.any(Array),%0A
+ %7D,%0A
%7D,%0A %7D);... |
310eb0a088e8d1d222c94e90f3fd4480bf702c31 | Remove special query for vehicle type combobox | demo/js/components/dashboard/combobox-selector.js | demo/js/components/dashboard/combobox-selector.js | angular.module("yds").directive("ydsComboboxSelector", ["$timeout", "DashboardService", "Data",
function ($timeout, DashboardService, Data) {
return {
restrict: "E",
scope: {
title: "@", // Title
type: "@", // Field facet
... | JavaScript | 0 | @@ -1149,654 +1149,8 @@
%22;%0A%0A
- // Set query depending on selection type%0A var query = %22*%22;%0A if (selectionType === %22trafficobservation.vehicle_type%22) %7B%0A query = %22type:TrafficObservation AND -vehicleType.label.en:Total AND -vehicleTyp... |
6684cde907da17ad26e9485e92e7431b18b4869f | Add new methods to tests in package | packages/youtube/package.js | packages/youtube/package.js | Package.describe({
name: 'pntbr:youtube',
version: '0.0.1',
summary: 'Manage Youtube\'s videos',
git: 'https://github.com/goacademie/fanhui',
documentation: 'README.md'
})
Package.onUse(function(api) {
api.versionsFrom('1.2.1')
api.use(['ecmascript', 'mongo'])
api.use(['iron:router', 'templating', 'ses... | JavaScript | 0.000001 | @@ -706,18 +706,16 @@
erver')%0A
-
api.ex
@@ -720,23 +720,32 @@
export(%5B
+%0A
'Vdos',
+%0A
'youtub
@@ -759,16 +759,124 @@
kLength'
+,%0A 'queryValueByFieldName',%0A 'checkTitle',%0A 'categoryByTitle',%0A 'dateByTitle',%0A 'rankByTitle'
%5D, 'clie
@@ -883,16 +883,8 @@
nt')
- // test
... |
24c35ee86b102e5c4fb5e28ffbdba14479db26a6 | Add EditIdeaDialog state unit test | desktop/src/Idea/__tests__/EditIdeaDialog.spec.js | desktop/src/Idea/__tests__/EditIdeaDialog.spec.js | /* eslint-env mocha, jest */
import getDefault from '../../shared/testUtils';
import EditIdeaDialog from '../EditIdeaDialog';
const defaultProps = {
open: false,
idea: '',
onRequestClose() {},
onRequestEdit() {},
};
const getActualDialog = getDefault(EditIdeaDialog, defaultProps);
it('should render', () => {... | JavaScript | 0 | @@ -1385,16 +1385,282 @@
uestEdit();%0A%7D);%0A
+%0Ait('should set FlatButton disabled based on state', () =%3E %7B%0A const wrapper = getActualDialog();%0A wrapper.find('TextField').props().onChange(%7B target: %7B value: 'a cool idea' %7D %7D);%0A expect(wrapper.find('Dialog').prop('actions')%5B0%5D.props.disable... |
3ea4c1e80fa0b043e073efd5e4e0a159fd8401df | Add EditTaskDialog state unit test | desktop/src/Task/__tests__/EditTaskDialog.spec.js | desktop/src/Task/__tests__/EditTaskDialog.spec.js | /* eslint-env mocha, jest */
import getDefault from '../../shared/testUtils';
import EditTaskDialog from '../EditTaskDialog';
const defaultProps = {
open: false,
task: '',
onRequestClose() {},
onRequestEdit() {},
};
const getActualDialog = getDefault(EditTaskDialog, defaultProps);
it('should render', () => {... | JavaScript | 0 | @@ -1378,16 +1378,282 @@
uestEdit();%0A%7D);%0A
+%0Ait('should set FlatButton disabled based on state', () =%3E %7B%0A const wrapper = getActualDialog();%0A wrapper.find('TextField').props().onChange(%7B target: %7B value: 'a cool task' %7D %7D);%0A expect(wrapper.find('Dialog').prop('actions')%5B0%5D.props.disable... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.