commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
cfe8dc32021cfddd601887dfab94647af85198a9
app/src/ui/multi-commit-operation/warn-force-push-dialog.tsx
app/src/ui/multi-commit-operation/warn-force-push-dialog.tsx
import * as React from 'react' import { Checkbox, CheckboxValue } from '../lib/checkbox' import { Dispatcher } from '../dispatcher' import { DialogFooter, DialogContent, Dialog } from '../dialog' import { OkCancelButtonGroup } from '../dialog/ok-cancel-button-group' interface IWarnForcePushProps { /** * This is e...
Create resusable warn force push-dialog
Create resusable warn force push-dialog
TypeScript
mit
j-f1/forked-desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,shiftkey/desktop,say25/desktop,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,say25/desktop,say25/desktop,desktop/deskto...
--- +++ @@ -0,0 +1,101 @@ +import * as React from 'react' +import { Checkbox, CheckboxValue } from '../lib/checkbox' +import { Dispatcher } from '../dispatcher' +import { DialogFooter, DialogContent, Dialog } from '../dialog' +import { OkCancelButtonGroup } from '../dialog/ok-cancel-button-group' + +interface IWarnFo...
90f8544c853f695ea0bdaaeac20d79e9a49f803d
applications/web/pages/auth/index.tsx
applications/web/pages/auth/index.tsx
import React, { FC , useEffect, useState } from "react"; import styled from "styled-components"; export const Main: FC = () => { const [ code, setCode ] = useState("") const [ codeState, setCodeState ] = useState("") const [ auth, setAuth ] = useState(false) const Message = styled.div` width:600px; ...
Add auth login to client
Add auth login to client
TypeScript
bsd-3-clause
nteract/composition,nteract/nteract,nteract/nteract,nteract/composition,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract
--- +++ @@ -0,0 +1,68 @@ +import React, { FC , useEffect, useState } from "react"; +import styled from "styled-components"; + +export const Main: FC = () => { +const [ code, setCode ] = useState("") +const [ codeState, setCodeState ] = useState("") +const [ auth, setAuth ] = useState(false) + +const Message = styled....
3f49591cb8b9d34da2fc7a38c6a5bc942048c89e
src/pages/post/[date]/[name]/index.tsx
src/pages/post/[date]/[name]/index.tsx
import type {GetStaticProps} from "next" import {TRPCError} from "@trpc/server" import type {FC} from "react" import {router} from "server/trpc/route" import {Post} from "server/db/entity/Post" import getEmptyPaths from "lib/util/getEmptyPaths" interface Props { post: Post } interface Query { date: string nam...
Add page for blog post
Add page for blog post
TypeScript
mit
octet-stream/eri,octet-stream/eri
--- +++ @@ -0,0 +1,49 @@ +import type {GetStaticProps} from "next" +import {TRPCError} from "@trpc/server" +import type {FC} from "react" + +import {router} from "server/trpc/route" +import {Post} from "server/db/entity/Post" + +import getEmptyPaths from "lib/util/getEmptyPaths" + +interface Props { + post: Post +} ...
be864c195e8b8513318aa9cec35423c35f18f642
src/datastore/postgres/schema/v14.ts
src/datastore/postgres/schema/v14.ts
import { IDatabase } from "pg-promise"; export const runSchema = async(db: IDatabase<unknown>) => { await db.none(` ALTER TABLE events ALTER COLUMN roomid TEXT NOT NULL; ALTER TABLE events ALTER COLUMN eventid TEXT NOT NULL; ALTER TABLE events ALTER COLUMN slackchannel TEXT NOT NULL; ...
Make columns in events not nullable
Make columns in events not nullable
TypeScript
apache-2.0
matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack
--- +++ @@ -0,0 +1,11 @@ +import { IDatabase } from "pg-promise"; + +export const runSchema = async(db: IDatabase<unknown>) => { + await db.none(` + ALTER TABLE events ALTER COLUMN roomid TEXT NOT NULL; + ALTER TABLE events ALTER COLUMN eventid TEXT NOT NULL; + ALTER TABLE events ALTER COLUMN ...
c3c9a28a1c2dda05408cb3c40f7fa99259ebd1ff
app/db/migrations/1517782491551-RemoveMediaThumbs.ts
app/db/migrations/1517782491551-RemoveMediaThumbs.ts
import {MigrationInterface, QueryRunner} from "typeorm"; export class RemoveMediaThumbs1517782491551 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<any> { console.log('Removing thumb_s3key from table media_storage') queryRunner.query(`ALTER TABLE media_storage D...
Remove the thumb s3key from DB
Remove the thumb s3key from DB
TypeScript
mit
seanmiddleditch/campman,seanmiddleditch/campman,seanmiddleditch/campman
--- +++ @@ -0,0 +1,16 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class RemoveMediaThumbs1517782491551 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise<any> { + console.log('Removing thumb_s3key from table media_storage') + queryRunner....
517e603bb2ba10002a9a43b4664f9cb28ad2db33
webui/reactutil_test.ts
webui/reactutil_test.ts
/// <reference path="../node_modules/react-typescript/declarations/react.d.ts" /> import react = require('react'); import reactutil = require('./reactutil'); import testLib = require('../lib/test'); testLib.addTest('merge props', (assert) => { assert.deepEqual(reactutil.mergeProps({ id: 'instanceId', className:...
Add unit test module for webui/reactutil
Add unit test module for webui/reactutil
TypeScript
bsd-3-clause
robertknight/passcards,robertknight/passcards,robertknight/passcards,robertknight/passcards
--- +++ @@ -0,0 +1,42 @@ +/// <reference path="../node_modules/react-typescript/declarations/react.d.ts" /> + +import react = require('react'); + +import reactutil = require('./reactutil'); +import testLib = require('../lib/test'); + +testLib.addTest('merge props', (assert) => { + assert.deepEqual(reactutil.mergeProp...
75949578ff56622ed841999425dab60044016f02
tests/cases/fourslash/getDeclarationDiagnostics.ts
tests/cases/fourslash/getDeclarationDiagnostics.ts
/// <reference path="fourslash.ts" /> // @declaration: true // @out: true // @Filename: inputFile1.ts //// module m { //// export class C implements I { } //// interface I { } //// } /*1*/ // @Filename: input2.ts //// var x = "hello world"; /*2*/ debugger; goTo.marker("1"); verify.numberOfErrorsInCurrentFile...
Add test case to make sure that we only report an error from target file
Add test case to make sure that we only report an error from target file
TypeScript
apache-2.0
blakeembrey/TypeScript,billti/TypeScript,mszczepaniak/TypeScript,pcan/TypeScript,shiftkey/TypeScript,evgrud/TypeScript,Eyas/TypeScript,chuckjaz/TypeScript,DanielRosenwasser/TypeScript,moander/TypeScript,evgrud/TypeScript,OlegDokuka/TypeScript,keir-rex/TypeScript,thr0w/Thr0wScript,zhengbli/TypeScript,Microsoft/TypeScrip...
--- +++ @@ -0,0 +1,20 @@ +/// <reference path="fourslash.ts" /> + +// @declaration: true +// @out: true + +// @Filename: inputFile1.ts +//// module m { +//// export class C implements I { } +//// interface I { } +//// } /*1*/ + +// @Filename: input2.ts +//// var x = "hello world"; /*2*/ + +debugger; +goTo.mark...
7ad4716f24002ef48a0c0562b938c09ce0dd17a4
tests/test_newton.ts
tests/test_newton.ts
import * as Newton from '../src/newton'; import { expect } from 'chai'; import 'mocha'; describe('Newton numeric solver', () => { it('Root of f(x) = x - 1. Should return approximately 1', () => { const result = Newton.NewtonRoot((x) => x - 1, (x) => 1, 0, 0.001); expect(result).approximately(1,0.1); exp...
Add test for Newton Numeric Solver
Add test for Newton Numeric Solver
TypeScript
mit
THeK3nger/calendar-generator,THeK3nger/calendar-generator
--- +++ @@ -0,0 +1,17 @@ +import * as Newton from '../src/newton'; + +import { expect } from 'chai'; +import 'mocha'; + +describe('Newton numeric solver', () => { + it('Root of f(x) = x - 1. Should return approximately 1', () => { + const result = Newton.NewtonRoot((x) => x - 1, (x) => 1, 0, 0.001); + expect(r...
1a092b0b221986a65fedecdcb501e4e34ebc8aab
types/styled-jsx/styled-jsx-tests.tsx
types/styled-jsx/styled-jsx-tests.tsx
import * as React from 'react'; import * as css from 'styled-jsx/css'; import flushToReact, { flushToHTML } from 'styled-jsx/server'; const styled = ( <div> <style jsx>{` color: rebeccapurple; `}</style> </div> ); const styledGlobal = ( <div> <style jsx global>{` ...
import * as React from 'react'; import * as css from 'styled-jsx/css'; import flushToReact, { flushToHTML } from 'styled-jsx/server'; const styled = ( <div> <style jsx>{` color: rebeccapurple; `}</style> </div> ); const styledGlobal = ( <div> <style jsx global>{` ...
Update styled-jsx/css typings, add tests for methods css.global and css.resolve
Update styled-jsx/css typings, add tests for methods css.global and css.resolve
TypeScript
mit
dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped...
--- +++ @@ -26,6 +26,29 @@ </div> ); +const globalCSS = css.global`body { margin: 0; }`; +const withGlobalCSS = ( + <div> + <style jsx global>{globalCSS}</style> + </div> +); + +const resolvedCSS = css.resolve`a { color: green; }`; +const withResolvedCSS = ( + <div> + <button className=...
efd5c28745c3d673d2c4e877ee4be19080264b5c
src/components/HitTable/EmptyHitTable.tsx
src/components/HitTable/EmptyHitTable.tsx
import * as React from 'react'; import { EmptyState } from '@shopify/polaris'; export interface Props { onAction: () => void; } const EmptyHitTable = ({ onAction }: Props) => { return ( <EmptyState heading="You haven't searched any HITs yet." action={{ content: 'Search HITs', onAct...
Add EmptyState component for when no HITs are in the redux store
Add EmptyState component for when no HITs are in the redux store
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
--- +++ @@ -0,0 +1,23 @@ +import * as React from 'react'; +import { EmptyState } from '@shopify/polaris'; + +export interface Props { + onAction: () => void; +} + +const EmptyHitTable = ({ onAction }: Props) => { + return ( + <EmptyState + heading="You haven't searched any HITs yet." + action={{ + ...
00839f3c91dc8fafb514b2fd3a5e174f4ae8de3e
ui/src/flux/components/FluxHeader.tsx
ui/src/flux/components/FluxHeader.tsx
import React, {PureComponent} from 'react' import {connect} from 'react-redux' import FluxOverlay from 'src/flux/components/FluxOverlay' import {OverlayContext} from 'src/shared/components/OverlayTechnology' import { showOverlay as showOverlayAction, ShowOverlay, } from 'src/shared/actions/overlayTechnology' impo...
import React, {PureComponent} from 'react' import {connect} from 'react-redux' import FluxOverlay from 'src/flux/components/FluxOverlay' import {OverlayContext} from 'src/shared/components/OverlayTechnology' import PageHeader from 'src/shared/components/PageHeader' import { showOverlay as showOverlayAction, ShowOv...
Implement PageHeader in Flux Editor page
Implement PageHeader in Flux Editor page
TypeScript
mit
influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,li-ang/inf...
--- +++ @@ -3,6 +3,7 @@ import FluxOverlay from 'src/flux/components/FluxOverlay' import {OverlayContext} from 'src/shared/components/OverlayTechnology' +import PageHeader from 'src/shared/components/PageHeader' import { showOverlay as showOverlayAction, ShowOverlay, @@ -18,18 +19,19 @@ class FluxHeader e...
78237739ba60354e6347946b19db7bafd9a1b015
tests/cases/fourslash/jsDocGenerics1.ts
tests/cases/fourslash/jsDocGenerics1.ts
///<reference path="fourslash.ts" /> // @allowNonTsExtensions: true // @Filename: ref.d.ts //// namespace Thing { //// export interface Thung { //// a: number; //// ] //// ] // @Filename: Foo.js //// //// /** @type {Array<number>} */ //// var v; //// v[0]./*1*/ //// //// /** @type {{...
Add more complex test scenarios
Add more complex test scenarios (cherry picked from commit e347c3711cc4b85eda34f1aba844e1a6576ff40c) # Conflicts: # tests/cases/fourslash/jsDocGenerics1.ts
TypeScript
apache-2.0
fabioparra/TypeScript,fabioparra/TypeScript,fabioparra/TypeScript,fabioparra/TypeScript
--- +++ @@ -0,0 +1,34 @@ +///<reference path="fourslash.ts" /> + +// @allowNonTsExtensions: true +// @Filename: ref.d.ts +//// namespace Thing { +//// export interface Thung { +//// a: number; +//// ] +//// ] + + +// @Filename: Foo.js +//// +//// /** @type {Array<number>} */ +//// var v; +//// v[0]./*...
6ef0a3f2aef3a4575a71cb185a57f75811221509
server/src/util/Stack.ts
server/src/util/Stack.ts
// Super simple stack export default class Stack<T> { private stack: T[]; constructor() { this.stack = []; } get size() { return this.stack.length; } public push(value: T): void { this.stack.push(value); } public pop(): T { return this.stack.pop(); } public peek(): T { return this.stack[this.si...
Add a super simple stack
Add a super simple stack
TypeScript
mit
rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby
--- +++ @@ -0,0 +1,28 @@ +// Super simple stack +export default class Stack<T> { + private stack: T[]; + + constructor() { + this.stack = []; + } + + get size() { + return this.stack.length; + } + + public push(value: T): void { + this.stack.push(value); + } + + public pop(): T { + return this.stack.pop(); + } + ...
0dcada6135b4711c3f550763b0ab2dba12e65dfa
src/api/resource.spec.ts
src/api/resource.spec.ts
import {MockApi} from './mock'; import {describeComponent} from '../tests/component'; describeComponent('reactive queries', [], () => { let mockApi: MockApi; let unsubscribeRequestedSpy: jasmine.Spy; beforeEach(() => { mockApi = new MockApi(); unsubscribeRequestedSpy = jasmine.createSpy('u...
Add unit tests for disposing subscriptions to a reactive query
Add unit tests for disposing subscriptions to a reactive query
TypeScript
apache-2.0
hadalin/resolwe-js,genialis/resolwe-js,genialis/resolwe-js,hadalin/resolwe-js
--- +++ @@ -0,0 +1,65 @@ +import {MockApi} from './mock'; +import {describeComponent} from '../tests/component'; + +describeComponent('reactive queries', [], () => { + let mockApi: MockApi; + let unsubscribeRequestedSpy: jasmine.Spy; + + beforeEach(() => { + mockApi = new MockApi(); + unsubscri...
6ebcc6e15111dbecea9dce9d1f3f462917136bf9
src/Test/Ast/SpoilerBlock.ts
src/Test/Ast/SpoilerBlock.ts
import { expect } from 'chai' import Up from '../../index' import { DocumentNode } from '../../SyntaxNodes/DocumentNode' import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode' import { SectionSeparatorNode } from '../../SyntaxNodes/SectionSeparatorNode' import { EmphasisNode } from '../../SyntaxNodes/EmphasisN...
Add failing spoiler block test
Add failing spoiler block test
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,37 @@ +import { expect } from 'chai' +import Up from '../../index' +import { DocumentNode } from '../../SyntaxNodes/DocumentNode' +import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode' +import { SectionSeparatorNode } from '../../SyntaxNodes/SectionSeparatorNode' +import { EmphasisNode } ...
94579f9fa1b3aeca7fbc486c5e53c46786546fde
src/lib/plugins/AuthPlugin/AuthPlugin.ts
src/lib/plugins/AuthPlugin/AuthPlugin.ts
import {injectDependency, InjectionDecorator} from '../../core/InjectionClient' import {exportDependency, PluginConfig, PluginConstructor} from '../../core/PluginConfig' const AUTH_MANAGER = 'authManager' export const injectAuth: InjectionDecorator = injectDependency(AUTH_MANAGER) export const createAuthPlugin: (aut...
Add a basic auth Plugin
Add a basic auth Plugin
TypeScript
mit
brightinteractive/bright-js-framework,brightinteractive/bright-js-framework,brightinteractive/bright-js-framework
--- +++ @@ -0,0 +1,38 @@ +import {injectDependency, InjectionDecorator} from '../../core/InjectionClient' +import {exportDependency, PluginConfig, PluginConstructor} from '../../core/PluginConfig' + +const AUTH_MANAGER = 'authManager' + +export const injectAuth: InjectionDecorator = injectDependency(AUTH_MANAGER) + +...
79c5d11e92ca7e2551cb56a46e9e359d971775a9
src/components/AccordionContext.spec.tsx
src/components/AccordionContext.spec.tsx
import * as React from 'react'; import { render } from 'react-testing-library'; import { Consumer, Provider } from './AccordionContext'; describe('ItemContext', () => { it('renders children props', () => { const { getByText } = render( <Provider> <Consumer>{(): string => 'Hello ...
Add unit tests for AccordionContext
Add unit tests for AccordionContext
TypeScript
mit
springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion
--- +++ @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { render } from 'react-testing-library'; +import { Consumer, Provider } from './AccordionContext'; + +describe('ItemContext', () => { + it('renders children props', () => { + const { getByText } = render( + <Provider> + ...
287b3217bf37d4b63af69115cbd52721e5e770b9
iterator/names-list/better-names-list.ts
iterator/names-list/better-names-list.ts
namespace BetterNamesList { interface NamesIterator { next(): string; hasNext(): boolean; } interface NamesList { getIterator(iterator: NamesIterator): NamesIterator; } class BetterNamesList implements NamesList { private namesList: Array<string> = []; add(name: string): void { this.namesList.p...
Add better names list implementation
Add better names list implementation
TypeScript
mit
Erichain/design-patterns-in-typescript,Erichain/design-patterns-in-typescript
--- +++ @@ -0,0 +1,66 @@ +namespace BetterNamesList { + interface NamesIterator { + next(): string; + hasNext(): boolean; + } + +interface NamesList { + getIterator(iterator: NamesIterator): NamesIterator; +} + +class BetterNamesList implements NamesList { + private namesList: Array<string> = []; + + add(n...
cb0b95a1630e1e526d402816755df073b109dfc7
spacer_hr.ts
spacer_hr.ts
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="hr_HR"> <context> <name>SpacerConfiguration</name> <message> <location filename="../spacerconfiguration.ui" line="12"/> <source>Spacer Settings</source> <translation type="unfinished"></translation> </me...
Create HR translations for panel and plugins
Create HR translations for panel and plugins
TypeScript
lgpl-2.1
lxde/lxqt-l10n
--- +++ @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="hr_HR"> +<context> + <name>SpacerConfiguration</name> + <message> + <location filename="../spacerconfiguration.ui" line="12"/> + <source>Spacer Settings</source> + <translation type=...
30e277a4fa4cba910ec18a83dddfc1d887619940
src/Test/Ast/LineBlock.ts
src/Test/Ast/LineBlock.ts
/// <reference path="../../../typings/mocha/mocha.d.ts" /> /// <reference path="../../../typings/chai/chai.d.ts" /> import { expect } from 'chai' import * as Up from '../../index' import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode' import { LinkNode } from '../../SyntaxNodes/LinkNode' import { DocumentNode } fro...
Add failing line block tests
Add failing line block tests
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,68 @@ +/// <reference path="../../../typings/mocha/mocha.d.ts" /> +/// <reference path="../../../typings/chai/chai.d.ts" /> + +import { expect } from 'chai' +import * as Up from '../../index' +import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode' +import { LinkNode } from '../../SyntaxNodes/Lin...
45e79f6b1ae15069d2ce4bdce6ac0f4881854bc7
src/client/app/utils/pagination.helper.ts
src/client/app/utils/pagination.helper.ts
export class PageData{ Display: string; IsActive: boolean; constructor(display: string, isActive: boolean){ this.Display = display; this.IsActive = isActive; } } export class Pagination{ public TotalItems: number; public ItemsPerPage: number; public TotalPag...
Create utility class for pagination
Create utility class for pagination
TypeScript
mit
CaoDuyThanh/WebAppClient,CaoDuyThanh/WebAppClient,CaoDuyThanh/WebAppClient
--- +++ @@ -0,0 +1,106 @@ +export class PageData{ + Display: string; + IsActive: boolean; + + constructor(display: string, + isActive: boolean){ + this.Display = display; + this.IsActive = isActive; + } +} + +export class Pagination{ + public TotalItems: number; + public...
a4bd75e04f328960130876f7f69411fb38a8f8fb
test/test_configschema.ts
test/test_configschema.ts
import * as yaml from "js-yaml"; import * as Chai from "chai"; import { ConfigValidator } from "matrix-appservice-bridge"; const expect = Chai.expect; describe("ConfigSchema", () => { const validator = new ConfigValidator("./config/config.schema.yaml"); it("should successfully validate a minimal config", () =...
Test that the minimal and sample configs pass validation
Test that the minimal and sample configs pass validation
TypeScript
apache-2.0
Half-Shot/matrix-appservice-discord
--- +++ @@ -0,0 +1,22 @@ +import * as yaml from "js-yaml"; +import * as Chai from "chai"; +import { ConfigValidator } from "matrix-appservice-bridge"; + +const expect = Chai.expect; + +describe("ConfigSchema", () => { + const validator = new ConfigValidator("./config/config.schema.yaml"); + it("should successfu...
e4af465163ea76c819eaae3e1bd52b0bbd258b29
packages/mathjax/__tests__/provider.spec.tsx
packages/mathjax/__tests__/provider.spec.tsx
import { shallow } from "enzyme"; import React from "react"; import MathJaxContext from "../src/context"; import MathJaxProvider from "../src/provider"; describe("MathJaxProvider", () => { it("renders without crashing", () => { const component = shallow(<MathJaxProvider>$x^2 + y = 3$</MathJaxProvider>); exp...
Add render without crash test for MathJax provider
Add render without crash test for MathJax provider
TypeScript
bsd-3-clause
nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract,nteract/composition,nteract/composition,nteract/composition
--- +++ @@ -0,0 +1,12 @@ +import { shallow } from "enzyme"; +import React from "react"; + +import MathJaxContext from "../src/context"; +import MathJaxProvider from "../src/provider"; + +describe("MathJaxProvider", () => { + it("renders without crashing", () => { + const component = shallow(<MathJaxProvider>$x^2 ...
4a860358baf48beeb4fce36adc5d2a44c4813a4e
console/src/app/core/services/mongoose-api-models/MongooseApi.model.ts
console/src/app/core/services/mongoose-api-models/MongooseApi.model.ts
// A class that describes endpoints for Mongoose API. // See Mongoose API (as for 27.03.2019): ... // ... https://github.com/emc-mongoose/mongoose-base/tree/master/doc/interfaces/api/remote export namespace MongooseApi { // NOTE: API for configuration. export class Config { public static readonly CON...
Move Mongoose config API endpoint into MongooseApi namespace.
Move Mongoose config API endpoint into MongooseApi namespace.
TypeScript
mit
emc-mongoose/console,emc-mongoose/console,emc-mongoose/console
--- +++ @@ -0,0 +1,21 @@ +// A class that describes endpoints for Mongoose API. +// See Mongoose API (as for 27.03.2019): ... +// ... https://github.com/emc-mongoose/mongoose-base/tree/master/doc/interfaces/api/remote + +export namespace MongooseApi { + + // NOTE: API for configuration. + export class Config {...
40d384c3803c1fd2835a44cc8d54ed1d46968759
frontend/terminal/__tests__/support_test.ts
frontend/terminal/__tests__/support_test.ts
const mockTerminal: Pick<Terminal, "open"> = { open: jest.fn(), }; jest.mock("xterm", () => { return { Terminal: function () { return mockTerminal; } }; }); import { Terminal } from "xterm"; import { attachTerminal, getCredentials } from "../support"; describe("getCredentials", () => { it("retu...
Test coverage for TerminalSession support methods
Test coverage for TerminalSession support methods
TypeScript
mit
FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/Farmbot-Web-API
--- +++ @@ -0,0 +1,57 @@ +const mockTerminal: Pick<Terminal, "open"> = { + open: jest.fn(), +}; + +jest.mock("xterm", () => { + return { + Terminal: function () { + return mockTerminal; + } + }; +}); + +import { Terminal } from "xterm"; +import { attachTerminal, getCredentials } from "../support"; + +de...
b54de6a58cd9ef9b85fddae9467b40486036a63e
test/unit/core/java/java-version-parser.spec.ts
test/unit/core/java/java-version-parser.spec.ts
import {JavaVersionParser} from '../../../../app/core/java/java-version-parser'; /** * @author Thomas Kleinke */ describe('JavaVersionParser', () => { it('parse Java version', () => { expect(JavaVersionParser.parse('java version "1.8.0_152"')).toBe(8); expect(JavaVersionParser.parse('java vers...
Add unit test for JavaVersionParser
Add unit test for JavaVersionParser
TypeScript
apache-2.0
codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client
--- +++ @@ -0,0 +1,16 @@ +import {JavaVersionParser} from '../../../../app/core/java/java-version-parser'; + + +/** + * @author Thomas Kleinke + */ +describe('JavaVersionParser', () => { + + it('parse Java version', () => { + + expect(JavaVersionParser.parse('java version "1.8.0_152"')).toBe(8); + ex...
683657a28132eec10db48a21ee82cba730392276
app/javascript/retrospring/utilities/notifications.ts
app/javascript/retrospring/utilities/notifications.ts
export function showErrorNotification(text: string): void { showNotification(text, false); } export function showNotification(text: string, status = true): void { window['showNotification'](text, status); }
Add TypeScript wrapper around legacy notification functionality
Add TypeScript wrapper around legacy notification functionality
TypeScript
agpl-3.0
Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring
--- +++ @@ -0,0 +1,7 @@ +export function showErrorNotification(text: string): void { + showNotification(text, false); +} + +export function showNotification(text: string, status = true): void { + window['showNotification'](text, status); +}
2b430f1c6fa0070298be96683508470b988876da
app/src/lib/progress/push-progress-parser.ts
app/src/lib/progress/push-progress-parser.ts
import { StepProgressParser } from './step-progress' /** * Highly approximate (some would say outright inaccurate) division * of the individual progress reporting steps in a push operation */ const steps = [ { title: 'Compressing objects', weight: 0.2 }, { title: 'Writing objects', weight: 0.7 }, { title: 're...
Add a push progress parser
Add a push progress parser
TypeScript
mit
shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,BugTesterTest/desktops,say25/desktop,hjobrien/desktop,artivilla/desktop,gengjiawen/desktop,BugTesterTest/desktops,shiftkey/desktop,say25/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,hjobrien/desktop,BugTesterTest/desktops,gengjiawen/desktop,desktop/d...
--- +++ @@ -0,0 +1,36 @@ +import { StepProgressParser } from './step-progress' + +/** + * Highly approximate (some would say outright inaccurate) division + * of the individual progress reporting steps in a push operation + */ +const steps = [ + { title: 'Compressing objects', weight: 0.2 }, + { title: 'Writing obj...
82668071e4b4c4e981755f81a586770f87ebd577
client/src/app/users/add-user.component.spec.ts
client/src/app/users/add-user.component.spec.ts
import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {MatDialogRef, MAT_DIALOG_DATA, MATERIAL_COMPATIBILITY_MODE} from '@angular/material'; import {AddUserComponent} from "./add-user.component"; import {CustomModule} from "../custom.module"; describe('Add user component', () => { let a...
Write karma tests for `AddUserComponent`
Write karma tests for `AddUserComponent` This gives us 100% coverage for `AddUserComponent`. You might argue it was an awful lot of work for a fairly small improvement in coverage, but I learned some useful things about mocking so that was nice.
TypeScript
mit
UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601/3601-lab4_mongo
--- +++ @@ -0,0 +1,42 @@ +import {async, ComponentFixture, TestBed} from '@angular/core/testing'; + +import {MatDialogRef, MAT_DIALOG_DATA, MATERIAL_COMPATIBILITY_MODE} from '@angular/material'; + +import {AddUserComponent} from "./add-user.component"; +import {CustomModule} from "../custom.module"; + +describe('Add ...
d92d475c8986c89933c3c8b3da6c9a3624798e39
packages/@glimmer/syntax/lib/traversal/errors.ts
packages/@glimmer/syntax/lib/traversal/errors.ts
import * as AST from '../types/nodes'; import { Option } from '@glimmer/interfaces'; class TraversalError extends Error { constructor(message: string, public node: AST.Node, public parent: Option<AST.Node>, public key: string) { super(message); } } TraversalError.prototype = Object.create(Error.prototype); Tr...
import * as AST from '../types/nodes'; import { Option } from '@glimmer/interfaces'; export interface TraversalError extends Error { constructor: TraversalErrorConstructor; key: string; node: AST.Node; parent: Option<AST.Node>; } export interface TraversalErrorConstructor { new (message: string, node: AST.N...
Convert TraversalError class to ES5 syntax
Convert TraversalError class to ES5 syntax The `prototype` property on classes is readonly.
TypeScript
mit
lbdm44/glimmer-vm,tildeio/glimmer,tildeio/glimmer,lbdm44/glimmer-vm,tildeio/glimmer,glimmerjs/glimmer-vm,glimmerjs/glimmer-vm,lbdm44/glimmer-vm,glimmerjs/glimmer-vm
--- +++ @@ -1,14 +1,34 @@ import * as AST from '../types/nodes'; import { Option } from '@glimmer/interfaces'; -class TraversalError extends Error { - constructor(message: string, public node: AST.Node, public parent: Option<AST.Node>, public key: string) { - super(message); - } +export interface TraversalEr...
5b02616d037d047af8dc5b3d2630899c94474b8a
webpack/account/__tests__/state_to_props_test.ts
webpack/account/__tests__/state_to_props_test.ts
import { mapStateToProps } from "../state_to_props"; import { fakeState } from "../../__test_support__/fake_state"; describe("mapStateToProps()", () => { it("populates user", () => { const result = mapStateToProps(fakeState()); expect(result.user).toBeTruthy(); expect(result.user).toBeInstanceOf(Object);...
import { mapStateToProps } from "../state_to_props"; import { fakeState } from "../../__test_support__/fake_state"; describe("mapStateToProps()", () => { it("populates data", () => { const result = mapStateToProps(fakeState()); expect(result.user).toBeTruthy(); expect(result.user).toBeInstanceOf(Object);...
Add fake user to fakeState()
Add fake user to fakeState()
TypeScript
mit
gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/farm...
--- +++ @@ -2,9 +2,10 @@ import { fakeState } from "../../__test_support__/fake_state"; describe("mapStateToProps()", () => { - it("populates user", () => { + it("populates data", () => { const result = mapStateToProps(fakeState()); expect(result.user).toBeTruthy(); expect(result.user).toBeInstan...
0b621f37daf3e8c92263443ff6aef25cdf9584a7
ui/src/ifql/components/KeyboardShortcuts.tsx
ui/src/ifql/components/KeyboardShortcuts.tsx
import {PureComponent, ReactNode} from 'react' interface Props { children: ReactNode onControlEnter: () => void } class KeyboardShortcuts extends PureComponent<Props> { public componentWillMount() { document.addEventListener('keydown', this.handleKeyboardShortcuts) } public componentWillUnmount() { ...
Add support for keyboard shortcuts
Add support for keyboard shortcuts
TypeScript
mit
influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influ...
--- +++ @@ -0,0 +1,29 @@ +import {PureComponent, ReactNode} from 'react' + +interface Props { + children: ReactNode + onControlEnter: () => void +} + +class KeyboardShortcuts extends PureComponent<Props> { + public componentWillMount() { + document.addEventListener('keydown', this.handleKeyboardShortcuts) + } ...
c03e601a5079f67aae15d2780e8c01d2136da18e
types/pg-query-stream/pg-query-stream-tests.ts
types/pg-query-stream/pg-query-stream-tests.ts
import * as QueryStream from 'pg-query-stream'; import * as pg from 'pg'; const options: QueryStream.Options = { highWaterMark: 1000, batchSize: 100 }; const query = new QueryStream('SELECT * FROM generate_series(0, $1) num', [1000000], options); pg.connect('', (err, client, done) => { const stream = cli...
import * as QueryStream from 'pg-query-stream'; import * as pg from 'pg'; const options: QueryStream.Options = { highWaterMark: 1000, batchSize: 100 }; const query = new QueryStream('SELECT * FROM generate_series(0, $1) num', [1000000], options); const pool = new pg.Pool(); pool.connect((err, client, done) =...
Update pg-query-stream test to use pg@7.1 API.
Update pg-query-stream test to use pg@7.1 API.
TypeScript
mit
magny/DefinitelyTyped,benliddicott/DefinitelyTyped,georgemarshall/DefinitelyTyped,abbasmhd/DefinitelyTyped,benishouga/DefinitelyTyped,AgentME/DefinitelyTyped,arusakov/DefinitelyTyped,nycdotnet/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,jimthedev/DefinitelyTyped,alexdresko/DefinitelyTyped,benishouga/DefinitelyTyped,geo...
--- +++ @@ -8,7 +8,8 @@ const query = new QueryStream('SELECT * FROM generate_series(0, $1) num', [1000000], options); -pg.connect('', (err, client, done) => { +const pool = new pg.Pool(); +pool.connect((err, client, done) => { const stream = client.query(query); stream.on('end', () => { clien...
5983672797648211f8ed8116331e494823895722
src/dashboard-refactor/search-results/types.ts
src/dashboard-refactor/search-results/types.ts
import { AnnotationsSorter } from 'src/sidebar/annotations-sidebar/sorting' type Note = any type Page = any type NoteType = 'search' | 'user' | 'followed' interface NewNoteFormState { inputValue: string // TODO: work out these states (may re-use from sidebar state) } interface NoteState { id: string ...
Write first attempt at results state shape
Write first attempt at results state shape - more complicated than it seems, mainly due to the doubly nested nature of the groupings (days -> pages -> notes) - main differences from old: - regardless of search type, the state shape will be the same (in the case of page search, it will always have a single entry at t...
TypeScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
--- +++ @@ -0,0 +1,37 @@ +import { AnnotationsSorter } from 'src/sidebar/annotations-sidebar/sorting' + +type Note = any +type Page = any +type NoteType = 'search' | 'user' | 'followed' + +interface NewNoteFormState { + inputValue: string + // TODO: work out these states (may re-use from sidebar state) +} + +in...
2d561e9ba741feb93402dce62398c4f91e28d248
packages/@glimmer/wire-format/lib/opcodes.ts
packages/@glimmer/wire-format/lib/opcodes.ts
export enum Opcodes { // Statements Text, Append, Comment, Modifier, Block, Component, OpenElement, FlushElement, CloseElement, StaticAttr, DynamicAttr, Yield, Partial, DynamicArg, StaticArg, TrustingAttr, Debugger, ClientSideStatement, // Expressions Unknown, Get, Maybe...
export enum Opcodes { // Statements Text, Append, Comment, Modifier, Block, Component, OpenElement, FlushElement, CloseElement, StaticAttr, DynamicAttr, Yield, Partial, DynamicArg, StaticArg, TrustingAttr, Debugger, ClientSideStatement, // Expressions Unknown, Get, Maybe...
Remove unused WF opcode (it's now MaybeLocal)
Remove unused WF opcode (it's now MaybeLocal)
TypeScript
mit
tildeio/glimmer,lbdm44/glimmer-vm,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm,lbdm44/glimmer-vm,lbdm44/glimmer-vm,glimmerjs/glimmer-vm
--- +++ @@ -25,7 +25,6 @@ Unknown, Get, MaybeLocal, - FixThisBeforeWeMerge, HasBlock, HasBlockParams, Undefined,
894adbc6fdccd58313123a48dcd889be54035b1a
types/client-sessions/client-sessions-tests.ts
types/client-sessions/client-sessions-tests.ts
import * as express from "express"; import * as session from "client-sessions"; const secret = "yolo"; const app = express(); const options = { secret }; let middleware = session(options); middleware = session({ secret, cookieName: "_s" }); middleware = session({ secret, duration: 600000 }); middleware = session({ se...
import express = require("express"); import session = require("client-sessions"); const secret = "yolo"; const app = express(); const options = { secret }; let middleware = session(options); middleware = session({ secret, cookieName: "_s" }); middleware = session({ secret, duration: 600000 }); middleware = session({ ...
Correct test to use require imports instead of namespace imports.
Correct test to use require imports instead of namespace imports.
TypeScript
mit
ashwinr/DefinitelyTyped,mcliment/DefinitelyTyped,markogresak/DefinitelyTyped,ashwinr/DefinitelyTyped,georgemarshall/DefinitelyTyped,chrootsu/DefinitelyTyped,dsebastien/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,aciccarello/DefinitelyTyped,magny/DefinitelyTyped,borisyankov/DefinitelyTyped,dsebastien/DefinitelyTyped,nyc...
--- +++ @@ -1,5 +1,5 @@ -import * as express from "express"; -import * as session from "client-sessions"; +import express = require("express"); +import session = require("client-sessions"); const secret = "yolo"; const app = express();
aaf21cd2204e65bb79f7fc601ed9e2fab1df9799
packages/services/test/src/setting/manager.spec.ts
packages/services/test/src/setting/manager.spec.ts
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import expect = require('expect.js'); import { ServerConnection, SettingManager } from '../../../lib'; describe('setting', () => { describe('SettingManager', () => { describe('#constructor()', () => { ...
Add initial setting service tests.
Add initial setting service tests.
TypeScript
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
--- +++ @@ -0,0 +1,44 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import expect = require('expect.js'); + +import { + ServerConnection, SettingManager +} from '../../../lib'; + + +describe('setting', () => { + + describe('SettingManager', () => { + ...
001b91f9225ca8cde29d2222ec799337d9189866
src/selectors/searchTable.ts
src/selectors/searchTable.ts
import { createSelector } from 'reselect'; import { RootState, SearchResult, SearchResults, HitBlockMap, RequesterBlockMap, SortingOption } from '../types'; import { sortBy } from '../utils/sorting'; const searchResultSelector = (state: RootState) => state.search; const sortOptionSelector = (state: RootSta...
Add selectors to filter blocked HITs, filter blocked requesters, and sort results.
Add selectors to filter blocked HITs, filter blocked requesters, and sort results.
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
--- +++ @@ -0,0 +1,56 @@ +import { createSelector } from 'reselect'; +import { + RootState, + SearchResult, + SearchResults, + HitBlockMap, + RequesterBlockMap, + SortingOption +} from '../types'; +import { sortBy } from '../utils/sorting'; + +const searchResultSelector = (state: RootState) => state.search; +co...
aa69b34d04076272d83e398c64053ee27e1f9a51
test/server/httpCodes.ts
test/server/httpCodes.ts
// NOTE Running these tests requires the crossroads-education/eta-web-test module to be installed. process.env.ETA_testing = "true"; process.env.ETA_auth_provider = "cre-web-test"; process.env.ETA_db_isReadOnly = "true"; /* import tests from "../../server/api/tests"; before(function(done) { this.timeout(10000); ...
Implement basic integration tests Not ready for CircleCI, so they're commented out
Implement basic integration tests Not ready for CircleCI, so they're commented out
TypeScript
mit
crossroads-education/eta,crossroads-education/eta
--- +++ @@ -0,0 +1,34 @@ +// NOTE Running these tests requires the crossroads-education/eta-web-test module to be installed. +process.env.ETA_testing = "true"; +process.env.ETA_auth_provider = "cre-web-test"; +process.env.ETA_db_isReadOnly = "true"; + +/* +import tests from "../../server/api/tests"; + +before(functio...
fcef3460bf9134dee6552bb95fe0fb8ec8772d63
src/utils/decorate.ts
src/utils/decorate.ts
import { Config, defaultConfig } from './config' /** * Formats raw title string and returns the formatted string. * @param {string} title raw title to format * @param {boolean} [shouldUppercase] whether the title should be uppercased (default: true) * @return {string} formatted title */ const formatTitle: (string...
Add function for the actual formatting of the title
Add function for the actual formatting of the title
TypeScript
mit
guywald1/vscode-prismo
--- +++ @@ -0,0 +1,46 @@ +import { Config, defaultConfig } from './config' + +/** + * Formats raw title string and returns the formatted string. + * @param {string} title raw title to format + * @param {boolean} [shouldUppercase] whether the title should be uppercased (default: true) + * @return {string} formatted ti...
6e617f7ebb32997ee206710ddb4dd6411fc26387
tests/gui/specs/webdriverio.spec.ts
tests/gui/specs/webdriverio.spec.ts
import { describe, expect, it, loadFixture } from '../suite'; import fs from 'fs-extra'; import path from 'path'; import jimp from 'jimp'; describe('webdriverio', () => { async function compareScreenshot(screenshot: Buffer, baseline: string) { const result = jimp.diff( await jimp.read( await fs.rea...
Add learning tests for webdriverio
Add learning tests for webdriverio
TypeScript
mit
uberVU/mugshot,uberVU/mugshot
--- +++ @@ -0,0 +1,25 @@ +import { describe, expect, it, loadFixture } from '../suite'; +import fs from 'fs-extra'; +import path from 'path'; +import jimp from 'jimp'; + +describe('webdriverio', () => { + async function compareScreenshot(screenshot: Buffer, baseline: string) { + const result = jimp.diff( + a...
3a3cd78552f091ebc09ddaa2497fef0d3b3c0316
frontend/src/app/Services/chatbot.service.spec.ts
frontend/src/app/Services/chatbot.service.spec.ts
/* * Copyright (c) 2014-2020 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing' import { fakeAsync, inject, TestBed, tick } from '@angular/core/testing' import { ChatbotService } from './chatbot.service' describe('Chatb...
Add unit tests for chatbot service
Add unit tests for chatbot service Signed-off-by: Scar26 <31beafb5334eea9f0c328bdc4f3cbc34e823c35f@gmail.com>
TypeScript
mit
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
--- +++ @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014-2020 Bjoern Kimminich. + * SPDX-License-Identifier: MIT + */ + +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing' +import { fakeAsync, inject, TestBed, tick } from '@angular/core/testing' + +import { ChatbotService } from ...
087745ea3103ad964c825860822da5058b6402a2
src/app/components/search/search.resource.spec.ts
src/app/components/search/search.resource.spec.ts
import { SearchResource } from './search.resource'; describe('Resource Search', () => { beforeEach(angular.mock.module('roam')); it('should be registered', inject((searchResource: SearchResource) => { expect(searchResource).not.toBeNull(); })); });
Add Search Resource Unit Test:
Add Search Resource Unit Test: Added unit test for the resource.
TypeScript
mit
marksmall/mapuse,marksmall/mapuse,marksmall/mapuse
--- +++ @@ -0,0 +1,9 @@ +import { SearchResource } from './search.resource'; + +describe('Resource Search', () => { + beforeEach(angular.mock.module('roam')); + + it('should be registered', inject((searchResource: SearchResource) => { + expect(searchResource).not.toBeNull(); + })); +});
2ccaa61888725040d612d0683fa457a0badc09d4
src/utils/returnHit.ts
src/utils/returnHit.ts
import axios from 'axios'; import { API_URL } from '../constants'; import { stringToDomElement } from './parsing'; export const returnHit = async (hitId: string) => { try { const response = await axios.get( `${API_URL}/mturk/return?hitId=${hitId}&inPipeline=false` ); const rawHtml: string ...
Add requesting and parsing for returning a HIT.
Add requesting and parsing for returning a HIT.
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
--- +++ @@ -0,0 +1,30 @@ +import axios from 'axios'; +import { API_URL } from '../constants'; +import { stringToDomElement } from './parsing'; + +export const returnHit = async (hitId: string) => { + try { + const response = await axios.get( + `${API_URL}/mturk/return?hitId=${hitId}&inPipeline=false` + );...
43d7bcf5858de0ac827b067168b0eef51bd9f92b
src/core/test/ts/browser/InlineEditorRemoveTest.ts
src/core/test/ts/browser/InlineEditorRemoveTest.ts
import { Assertions, GeneralSteps, Pipeline, Logger, Step } from '@ephox/agar'; import EditorManager from 'tinymce/core/api/EditorManager'; import Theme from 'tinymce/themes/modern/Theme'; import { UnitTest } from '@ephox/bedrock'; import ViewBlock from '../module/test/ViewBlock'; UnitTest.asynctest('browser.tinymce.c...
Create test for inline editor removal
TINY-1669: Create test for inline editor removal
TypeScript
lgpl-2.1
FernCreek/tinymce,tinymce/tinymce,FernCreek/tinymce,tinymce/tinymce,TeamupCom/tinymce,danielpunkass/tinymce,danielpunkass/tinymce,FernCreek/tinymce,tinymce/tinymce,danielpunkass/tinymce,TeamupCom/tinymce
--- +++ @@ -0,0 +1,47 @@ +import { Assertions, GeneralSteps, Pipeline, Logger, Step } from '@ephox/agar'; +import EditorManager from 'tinymce/core/api/EditorManager'; +import Theme from 'tinymce/themes/modern/Theme'; +import { UnitTest } from '@ephox/bedrock'; +import ViewBlock from '../module/test/ViewBlock'; + +Uni...
442bc56fc2b1a4ba862cd33895f3185dafc85044
tests/cases/fourslash/getOutliningSpansForRegions.ts
tests/cases/fourslash/getOutliningSpansForRegions.ts
/// <reference path="fourslash.ts"/> ////// basic region ////[|// #region //// ////// #endregion|] //// ////// region with label ////[|// #region label1 //// ////// #endregion|] //// ////// region with extra whitespace in all valid locations ////[| // #region label2 la...
Add test for region spans
Add test for region spans
TypeScript
apache-2.0
nojvek/TypeScript,kitsonk/TypeScript,synaptek/TypeScript,kpreisser/TypeScript,basarat/TypeScript,RyanCavanaugh/TypeScript,microsoft/TypeScript,alexeagle/TypeScript,weswigham/TypeScript,minestarks/TypeScript,microsoft/TypeScript,alexeagle/TypeScript,Eyas/TypeScript,Eyas/TypeScript,nojvek/TypeScript,TukekeSoft/TypeScript...
--- +++ @@ -0,0 +1,46 @@ +/// <reference path="fourslash.ts"/> + +////// basic region +////[|// #region +//// +////// #endregion|] +//// +////// region with label +////[|// #region label1 +//// +////// #endregion|] +//// +////// region with extra whitespace in all valid locations +////[| // #...
a353b56c2a803209804a5f0ff2f8daaa018c95a7
client/test/Combatant.test.ts
client/test/Combatant.test.ts
import { StatBlock } from "../../common/StatBlock"; import { InitializeSettings } from "../Settings/Settings"; import { buildEncounter } from "./buildEncounter"; describe("Combatant", () => { beforeEach(() => { InitializeSettings(); }); test("Should have its Max HP set from the statblock", () ...
Test that combatant gets its HP from its statblock
Test that combatant gets its HP from its statblock
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
--- +++ @@ -0,0 +1,16 @@ +import { StatBlock } from "../../common/StatBlock"; +import { InitializeSettings } from "../Settings/Settings"; +import { buildEncounter } from "./buildEncounter"; + +describe("Combatant", () => { + beforeEach(() => { + InitializeSettings(); + }); + + test("Should have it...
e2b75720a9f9392e3e04d508ca774020c6a702ae
src/notebook/notebook/widgetfactory.ts
src/notebook/notebook/widgetfactory.ts
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. 'use strict'; import { IKernelId } from 'jupyter-js-services'; import { IWidgetFactory, IDocumentContext } from 'jupyter-js-ui/lib/docmanager'; import { RenderMime } from 'jupyter-js-ui/lib/rendermime'; impo...
Add a notebook widget factory
Add a notebook widget factory
TypeScript
bsd-3-clause
jupyter/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,TypeFox/jupyt...
--- +++ @@ -0,0 +1,86 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. +'use strict'; + +import { + IKernelId +} from 'jupyter-js-services'; + +import { + IWidgetFactory, IDocumentContext +} from 'jupyter-js-ui/lib/docmanager'; + +import { + RenderMime +} ...
919bc2eb1b720571a9098254d685fa71e32f9d94
src/smc-webapp/smc-react/examples/example_actions.ts
src/smc-webapp/smc-react/examples/example_actions.ts
import { Store, store_definition } from "../Store"; import { redux, Actions } from "../../smc-react"; // Basic Store interface bakeryState { cake: string; pie: string; } let init_state: bakeryState = { cake: "chocolate", pie: "pizza" }; let store = redux.createStore("test", init_state); class bakeryActio...
Add an example for actions
Add an example for actions
TypeScript
agpl-3.0
DrXyzzy/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc
--- +++ @@ -0,0 +1,27 @@ +import { Store, store_definition } from "../Store"; +import { redux, Actions } from "../../smc-react"; + + +// Basic Store +interface bakeryState { + cake: string; + pie: string; +} + +let init_state: bakeryState = { + cake: "chocolate", + pie: "pizza" +}; + +let store = redux.createStor...
5b83f59c3a224263baa07ef87ff37abca2e39cdd
src/app/app.component.spec.ts
src/app/app.component.spec.ts
import { provide } from 'angular2/core'; import { it, describe, expect, beforeEach, beforeEachProviders, inject, injectAsync } from 'angular2/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEachProviders(() => [ AppComponent ]); it('should be instantiated and inje...
Add a silly app component test
Add a silly app component test
TypeScript
agpl-3.0
PRX/publish.prx.org,PRX/publish.prx.org,PRX/publish.prx.org,PRX/publish.prx.org
--- +++ @@ -0,0 +1,13 @@ +import { provide } from 'angular2/core'; +import { it, describe, expect, beforeEach, beforeEachProviders, inject, injectAsync } from 'angular2/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + + beforeEachProviders(() => [ AppComponent ]); + + ...
45d4a9aed53981bbd6d016b9e2d17c28eee54658
packages/elasticsearch-store/test/helpers/template-index.ts
packages/elasticsearch-store/test/helpers/template-index.ts
import { Overwrite } from '@terascope/utils'; export interface TemplateRecord { some_id: string; search_keyword: string; random_number: number; } export type TemplateRecordInput = Overwrite<TemplateRecord, { random_number?: number; }>; export const templateRecordSchema = { additionalProperties: f...
Add Template Index helper file
Add Template Index helper file
TypeScript
apache-2.0
terascope/teraslice,terascope/teraslice,terascope/teraslice,terascope/teraslice
--- +++ @@ -0,0 +1,52 @@ +import { Overwrite } from '@terascope/utils'; + +export interface TemplateRecord { + some_id: string; + search_keyword: string; + random_number: number; +} + +export type TemplateRecordInput = Overwrite<TemplateRecord, { + random_number?: number; +}>; + +export const templateReco...
2e16e330efe865f67e3595f28d1058c5cf6f5272
src/providers/busca-produto-service.ts
src/providers/busca-produto-service.ts
import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/toPromise'; @Injectable() export class BuscaProdutoService { constructor(public http: Http) { console.log('Hello BuscaProdutoService Provider'); } getProdut...
Test consumes api new files
Test consumes api new files
TypeScript
mit
fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course,fernandofraga109/ionic-2-course
--- +++ @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { Http, Response } from '@angular/http'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/toPromise'; + + +@Injectable() +export class BuscaProdutoService { + + constructor(public http: Http) { + console.log('Hello BuscaProdu...
746b3c409981ba780078d89378445f46634f6a38
meter/meter.view.ts
meter/meter.view.ts
namespace $.$mol { export class $mol_meter extends $.$mol_meter { request_id = 0; constructor() { super() this.defer_task() } defer_task( next?: $mol_defer, force?: $mol_atom_force ) { this.request_id = requestAnimationFrame( () => { const elem = this.dom_node() as HTMLElement const r...
namespace $.$mol { export class $mol_meter extends $.$mol_meter { _request_id = 0; constructor() { super() this.defer_task() } defer_task( next?: $mol_defer, force?: $mol_atom_force ) { this._request_id = requestAnimationFrame( () => { const elem = this.dom_node() as HTMLElement const...
Add underscore to private variable name (request_id)
Add underscore to private variable name (request_id)
TypeScript
mit
eigenmethod/mol,nin-jin/mol,eigenmethod/mol,nin-jin/mol,eigenmethod/mol,nin-jin/mol
--- +++ @@ -1,7 +1,7 @@ namespace $.$mol { export class $mol_meter extends $.$mol_meter { - request_id = 0; + _request_id = 0; constructor() { super() @@ -9,7 +9,7 @@ } defer_task( next?: $mol_defer, force?: $mol_atom_force ) { - this.request_id = requestAnimationFrame( () => { + thi...
6e0df4d8bd7240cc38694c281337ab378b499d19
packages/ivi/__tests__/render_element_factory.spec.ts
packages/ivi/__tests__/render_element_factory.spec.ts
import { elementFactory } from "../src/vdom/element"; import { render } from "./utils"; import * as h from "./utils/html"; test(`<div></div>`, () => { const e = elementFactory(h.div()); const n = render<HTMLElement>(e()); expect(n.tagName.toLowerCase()).toBe("div"); }); test(`predefined className: <div class="...
Add tests for element factories
Add tests for element factories
TypeScript
mit
ivijs/ivi,ivijs/ivi
--- +++ @@ -0,0 +1,44 @@ +import { elementFactory } from "../src/vdom/element"; +import { render } from "./utils"; +import * as h from "./utils/html"; + +test(`<div></div>`, () => { + const e = elementFactory(h.div()); + const n = render<HTMLElement>(e()); + + expect(n.tagName.toLowerCase()).toBe("div"); +}); + +t...
288c8e68562fe6633d868cccf178d7e5dfcc09fd
src/Test/Html/TableOfContents.ts
src/Test/Html/TableOfContents.ts
/*import { expect } from 'chai' import Up from '../../index' import { LinkNode } from '../../SyntaxNodes/LinkNode' import { ImageNode } from '../../SyntaxNodes/ImageNode' import { AudioNode } from '../../SyntaxNodes/AudioNode' import { VideoNode } from '../../SyntaxNodes/VideoNode' import { DocumentNode } from '../../S...
Add file for table of contents HTML tests
Add file for table of contents HTML tests
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,45 @@ +/*import { expect } from 'chai' +import Up from '../../index' +import { LinkNode } from '../../SyntaxNodes/LinkNode' +import { ImageNode } from '../../SyntaxNodes/ImageNode' +import { AudioNode } from '../../SyntaxNodes/AudioNode' +import { VideoNode } from '../../SyntaxNodes/VideoNode' +imp...
f5dc2fecb1ecaa7f0298d4c04e3b8acac1393985
lighthouse-cli/types/types.ts
lighthouse-cli/types/types.ts
interface AuditResult { displayValue: string; debugString: string; comingSoon?: boolean; score: number; description: string; extendedInfo?: { value: string; formatter: string; }; } interface AggregationResultItem { overall: number; name: string; scored: boolean; subItems: Array<AuditResul...
interface AuditResult { displayValue: string; debugString: string; comingSoon?: boolean; score: number; description: string; name: string; category: string; helpText?: string; requiredArtifacts?: Array<string>; extendedInfo?: { value: string; formatter: string; }; } interface AggregationR...
Add more object shape properties to AuditResult.
Add more object shape properties to AuditResult.
TypeScript
apache-2.0
GoogleChrome/lighthouse,deepanjanroy/lighthouse,tommycli/lighthouse,mixed/lighthouse,tommycli/lighthouse,tkadlec/lighthouse,cedricbellet/lighthouse,deepanjanroy/lighthouse,umaar/lighthouse,mixed/lighthouse,deepanjanroy/lighthouse,ev1stensberg/lighthouse,tommycli/lighthouse,arturmiz/lighthouse,deepanjanroy/lighthouse,mi...
--- +++ @@ -4,6 +4,10 @@ comingSoon?: boolean; score: number; description: string; + name: string; + category: string; + helpText?: string; + requiredArtifacts?: Array<string>; extendedInfo?: { value: string; formatter: string;
532819a062313d41c01a93f35f40c69668e4cea5
packages/opencensus-core/test/test-span.ts
packages/opencensus-core/test/test-span.ts
import { Span } from '../src/trace/span'; import { Trace } from '../src/trace/trace'; var assert = require('assert'); describe('Span creation', function () { let trace; let span; before(function () { trace = new Trace(); span = trace.startSpan('spanName', 'typeSpan'); }); it('sh...
Add unit tests for span.ts
Add unit tests for span.ts
TypeScript
apache-2.0
census-instrumentation/opencensus-node,census-instrumentation/opencensus-node,census-instrumentation/opencensus-node
--- +++ @@ -0,0 +1,75 @@ +import { Span } from '../src/trace/span'; +import { Trace } from '../src/trace/trace'; + +var assert = require('assert'); + +describe('Span creation', function () { + + let trace; + let span; + + before(function () { + trace = new Trace(); + span = trace.startSpan('spa...
9fbc1e7f68ba1c1880fdce2fc4157608b8e2943c
src/app/audiologist-navigation/audiologist-navigation.component.spec.ts
src/app/audiologist-navigation/audiologist-navigation.component.spec.ts
import { AudiologistNavigationComponent } from './audiologist-navigation.component'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA } from '@angular/core'; /* Unit tests for the Audiologist Navigation comoponent */ fdescribe('AudiologistNavigationComponent', () =>...
Add initial unit test starter file and code
Add initial unit test starter file and code
TypeScript
mit
marissa-hagglund/VA-Audiology-Website,marissa-hagglund/VA-Audiology-Website,marissa-hagglund/VA-Audiology-Website
--- +++ @@ -0,0 +1,27 @@ +import { AudiologistNavigationComponent } from './audiologist-navigation.component'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { NO_ERRORS_SCHEMA } from '@angular/core'; + +/* + Unit tests for the Audiologist Navigation comoponent +*/ +fdescribe('Aud...
0763774831bff6a22f3f578572109db408ff3e4b
test/custom_decorator.spec.ts
test/custom_decorator.spec.ts
import { getType, } from '../src'; function UserDecorator(target: any) { } function OtherDecorator(target: any) { } @UserDecorator export class MyClassA { a: string; } @OtherDecorator export class MyClassB { a: string; } describe('Custom Decorators', () => { // Note UserDecorator is configured in we...
Add test for support of custom decorator names.
Add test for support of custom decorator names.
TypeScript
mit
goloveychuk/tsruntime,goloveychuk/tsruntime
--- +++ @@ -0,0 +1,34 @@ +import { + getType, +} from '../src'; + + +function UserDecorator(target: any) { } + +function OtherDecorator(target: any) { } + +@UserDecorator +export class MyClassA { + a: string; +} + +@OtherDecorator +export class MyClassB { + a: string; +} + +describe('Custom Decorators', () =>...
7c15168ce4ff08c75f3e5a8b3ac9599424825e1d
src/lib/plugins/ControllerMountSpyPlugin/ControllerMountSpyPlugin.ts
src/lib/plugins/ControllerMountSpyPlugin/ControllerMountSpyPlugin.ts
import { PluginConfig, exportDependency, PluginConstructor } from '../../core/PluginConfig' import { memoize } from 'lodash'; export type MountSpyCondition = (x: React.Component) => boolean export interface MountSpyObserver { condition: MountSpyCondition resolve: () => void } export interface ControllerMountSpyP...
Add ControllerMountSpy plugin, allowing test cases to wait for async-loaded controllers to mount
Add ControllerMountSpy plugin, allowing test cases to wait for async-loaded controllers to mount
TypeScript
mit
brightinteractive/bright-js-framework,brightinteractive/bright-js-framework,brightinteractive/bright-js-framework
--- +++ @@ -0,0 +1,44 @@ +import { PluginConfig, exportDependency, PluginConstructor } from '../../core/PluginConfig' +import { memoize } from 'lodash'; + +export type MountSpyCondition = (x: React.Component) => boolean + +export interface MountSpyObserver { + condition: MountSpyCondition + resolve: () => void +} +...
26390cd46c4278b764317057710b0d241c20ed7f
src/Test/Ast/CodeBlock.ts
src/Test/Ast/CodeBlock.ts
/// <reference path="../../../typings/mocha/mocha.d.ts" /> /// <reference path="../../../typings/chai/chai.d.ts" /> import { expect } from 'chai' import * as Up from '../../index' import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode' import { DocumentNode } from '../../SyntaxNodes/DocumentNode' import { PlainTextN...
Add failing code block test
Add failing code block test
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,31 @@ +/// <reference path="../../../typings/mocha/mocha.d.ts" /> +/// <reference path="../../../typings/chai/chai.d.ts" /> + +import { expect } from 'chai' +import * as Up from '../../index' +import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode' +import { DocumentNode } from '../../SyntaxNodes...
ca328eff28e80235755e6f180dba8d0b8459ca26
src/notebook/widgetfactory.ts
src/notebook/widgetfactory.ts
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. 'use strict'; import { IKernelId } from 'jupyter-js-services'; import { IWidgetFactory, IDocumentContext } from 'jupyter-js-ui/lib/docmanager'; import { RenderMime } from 'jupyter-js-ui/lib/rendermime'; impo...
Add a notebook widget factory
Add a notebook widget factory
TypeScript
bsd-3-clause
jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook
--- +++ @@ -0,0 +1,86 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. +'use strict'; + +import { + IKernelId +} from 'jupyter-js-services'; + +import { + IWidgetFactory, IDocumentContext +} from 'jupyter-js-ui/lib/docmanager'; + +import { + RenderMime +} ...
72f30a830825b6c4d9d5428e4eeb8eb8745680ae
tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts
tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts
class C { x: number; "constructor"() { this.x = 0; } } (new C).constructor(); // Error class D { x: number; 'constructor'() { this.x = 0; } } (new C).constructor(); // Error class E { x: number; ['constructor']() { this.x = 0; } } (new E).constructor();
Add test for quoted constructors
Add test for quoted constructors
TypeScript
apache-2.0
weswigham/TypeScript,RyanCavanaugh/TypeScript,nojvek/TypeScript,kitsonk/TypeScript,RyanCavanaugh/TypeScript,minestarks/TypeScript,alexeagle/TypeScript,SaschaNaz/TypeScript,RyanCavanaugh/TypeScript,kpreisser/TypeScript,Microsoft/TypeScript,kpreisser/TypeScript,weswigham/TypeScript,microsoft/TypeScript,Microsoft/TypeScri...
--- +++ @@ -0,0 +1,23 @@ +class C { + x: number; + "constructor"() { + this.x = 0; + } +} +(new C).constructor(); // Error + +class D { + x: number; + 'constructor'() { + this.x = 0; + } +} +(new C).constructor(); // Error + +class E { + x: number; + ['constructor']() { + ...
2a12e545a918a620e8496887d8991770accd2457
spec/executor.spec.ts
spec/executor.spec.ts
import Executor from '../src/executor'; import * as sinon from 'sinon'; import { expect } from 'chai'; describe('executor', () => { const executorOptions = { maxRatePerSecond: 5, maxConcurrentTasks: 10 }; let executor; beforeEach(() => { executor = new Executor(executorOptions); }); describe...
Add first unit test for Executor.
Add first unit test for Executor.
TypeScript
mit
antivanov/js-crawler,antivanov/js-crawler,antivanov/js-crawler,antivanov/js-crawler
--- +++ @@ -0,0 +1,42 @@ +import Executor from '../src/executor'; +import * as sinon from 'sinon'; +import { expect } from 'chai'; + +describe('executor', () => { + + const executorOptions = { + maxRatePerSecond: 5, + maxConcurrentTasks: 10 + }; + let executor; + + beforeEach(() => { + executor = new Exe...
930ff3e28df1ea550d25525b498a7af93dd88643
src/ts/googledrive.ts
src/ts/googledrive.ts
import { loadingIndicator } from './ui/loading'; import { getGoogleDriveKey, refreshGoogleDriveTokenApi, saveToGoogleDriveApi, } from './requests'; import { ChromeLocalStorage, ChromeSyncStorage, OAuth2 } from './types'; import { notifySaveToCloudSuccessful, notifyUnableToUpload, } from '../js/libs/notificati...
Add support for saving photos to Google Drive
Add support for saving photos to Google Drive
TypeScript
mit
ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos
--- +++ @@ -0,0 +1,82 @@ +import { loadingIndicator } from './ui/loading'; +import { + getGoogleDriveKey, + refreshGoogleDriveTokenApi, + saveToGoogleDriveApi, +} from './requests'; +import { ChromeLocalStorage, ChromeSyncStorage, OAuth2 } from './types'; +import { + notifySaveToCloudSuccessful, + notifyUnableTo...
ea52f695a6f9d7b013212bb93a9583b3a2f2534f
src/contentRepo.ts
src/contentRepo.ts
import { MatrixClient } from "matrix-bot-sdk"; /** * Get the HTTP URL for an MXC URI. * @param {string} baseUrl The base homeserver url which has a content repo. * @param {string} mxc The mxc:// URI. * @param {Number} width The desired width of the thumbnail. * @param {Number} height The desired height of the thu...
Add a simple shim for the ContentRepo
Add a simple shim for the ContentRepo
TypeScript
apache-2.0
matrix-org/matrix-appservice-bridge,matrix-org/matrix-appservice-bridge,matrix-org/matrix-appservice-bridge
--- +++ @@ -0,0 +1,37 @@ +import { MatrixClient } from "matrix-bot-sdk"; + +/** + * Get the HTTP URL for an MXC URI. + * @param {string} baseUrl The base homeserver url which has a content repo. + * @param {string} mxc The mxc:// URI. + * @param {Number} width The desired width of the thumbnail. + * @param {Number} h...
0c7b03cad321a84ac8832b1423543befc2efde0c
src/reducers/__tests__/settings.node.tsx
src/reducers/__tests__/settings.node.tsx
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import {default as reducer, updateSettings, Tristate} from '../settings'; test('init', () => { const res = reduce...
Add tests for settings reducer
Add tests for settings reducer Summary: yiss_tests Reviewed By: jknoxville Differential Revision: D18851134 fbshipit-source-id: 53ffb9b516773df19c258e7d819962e3cd523751
TypeScript
mit
facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper
--- +++ @@ -0,0 +1,36 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import {default as reducer, updateSettings, Tristate} from '../settings'; + +te...
544be459c8f248354dfca600fb2f2201ffafc9d8
server/src/Linter.ts
server/src/Linter.ts
import URI from 'vscode-uri'; import { empty, iif, from, Observable } from 'rxjs'; import { map, mergeMap, switchMap } from 'rxjs/operators'; import { Diagnostic, TextDocument } from 'vscode-languageserver'; import { documentConfigurationCache, RubyEnvironment, workspaceRubyEnvironmentCache, RubyConfiguration, Rub...
Add base linter which emits diagnostics on document events
Add base linter which emits diagnostics on document events
TypeScript
mit
rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby
--- +++ @@ -0,0 +1,74 @@ +import URI from 'vscode-uri'; +import { empty, iif, from, Observable } from 'rxjs'; +import { map, mergeMap, switchMap } from 'rxjs/operators'; +import { Diagnostic, TextDocument } from 'vscode-languageserver'; +import { + documentConfigurationCache, + RubyEnvironment, + workspaceRubyEnviron...
6bbe2ba52c8ce36df8db1343c36b2e0b39471fa6
app/test/unit/format-commit-message.ts
app/test/unit/format-commit-message.ts
import * as chai from 'chai' const expect = chai.expect import { formatCommitMessage } from '../../src/lib/format-commit-message' describe('formatCommitMessage', () => { it('omits description when null', () => { expect(formatCommitMessage({ summary: 'test', description: null })) .to.equal('test') }) ...
Add some smoke tests for formatCommitMessage
Add some smoke tests for formatCommitMessage
TypeScript
mit
j-f1/forked-desktop,gengjiawen/desktop,j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop,gengjiawen/desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,artivilla/desktop,say25/desktop,hjobrien/desktop,say25/desktop,desktop/desktop,kactus-io/kactus,hjobrien/desktop,say25/desktop,kactus-io/kactus,j-f1/forked-d...
--- +++ @@ -0,0 +1,21 @@ +import * as chai from 'chai' +const expect = chai.expect + +import { formatCommitMessage } from '../../src/lib/format-commit-message' + +describe('formatCommitMessage', () => { + it('omits description when null', () => { + expect(formatCommitMessage({ summary: 'test', description: null }...
b71710de9c05479ffc270c0c08be3ced1ee4534e
console/src/app/common/HttpUtils.ts
console/src/app/common/HttpUtils.ts
export class HttpUtils { // NOTE: Checks if string matches an IP by pattern. public static isIpAddressValid(ipAddress: string): boolean { let ipValidationRegex: RegExp = new RegExp(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\....
Add HTTP utils (validation, etc.).
Add HTTP utils (validation, etc.).
TypeScript
mit
emc-mongoose/console,emc-mongoose/console,emc-mongoose/console
--- +++ @@ -0,0 +1,16 @@ +export class HttpUtils { + + // NOTE: Checks if string matches an IP by pattern. + public static isIpAddressValid(ipAddress: string): boolean { + let ipValidationRegex: RegExp = new RegExp(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]...
a94a9b899e5e01d5aaba13be92340bac54e501b3
app/services/tts/tts.service.spec.ts
app/services/tts/tts.service.spec.ts
/// <reference path="./../../../typings/index.d.ts" /> import { inject, async, TestBed, fakeAsync, tick } from '@angular/core/testing'; import { TtsService } from './tts.service'; import { config } from './../../config'; describe('TtsService', () => { beforeEach(() => { TestBed.configureTestingModule({ pro...
Add unit test for TtsService
Add unit test for TtsService
TypeScript
mit
alvinmvbt/mirror-mirror,alvinmvbt/mirror-mirror,alvinmvbt/mirror-mirror
--- +++ @@ -0,0 +1,17 @@ +/// <reference path="./../../../typings/index.d.ts" /> +import { inject, async, TestBed, fakeAsync, tick } from '@angular/core/testing'; +import { TtsService } from './tts.service'; +import { config } from './../../config'; + +describe('TtsService', () => { + beforeEach(() => { + TestBed...
0f01e1b2cb6ba31720de6c4376d5298bc5e472e3
ng2-components/ng2-alfresco-search/src/forms/search-term-validator.spec.ts
ng2-components/ng2-alfresco-search/src/forms/search-term-validator.spec.ts
/*! * @license * Copyright 2016 Alfresco Software, Ltd. * * 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 app...
Add tests for search term field validator
Add tests for search term field validator Refs #195
TypeScript
apache-2.0
Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components
--- +++ @@ -0,0 +1,44 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * 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/LICE...
054ad0b00c4472ec2d4ba4537fd13dc48aa2946f
src/color-regex.ts
src/color-regex.ts
'use strict'; // const COLOR_REGEX = /(#(?:[\da-f]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)|rgba\((?:\d{1,3},\s*){3}\d*\.?\d+\)|hsl\(\d{1,3}(?:,\s*\d{1,3}%){2}\)|hsla\(\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\))/gi // const HEXA_COLOR = /#(?:[\da-f]{3}($| |,|;)){1}|(?:(#(?:[\da-f]{3}){2})(\t|$| |,|;))/gi /** ...
Create css hexa color regex
Create css hexa color regex
TypeScript
apache-2.0
KamiKillertO/vscode-colorize,KamiKillertO/vscode-colorize
--- +++ @@ -0,0 +1,12 @@ +'use strict'; + +// const COLOR_REGEX = /(#(?:[\da-f]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)|rgba\((?:\d{1,3},\s*){3}\d*\.?\d+\)|hsl\(\d{1,3}(?:,\s*\d{1,3}%){2}\)|hsla\(\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\))/gi +// const HEXA_COLOR = /#(?:[\da-f]{3}($| |,|;)){1}|(?:(#(?:[\da-f]{3})...
28c57c3b68803818f62f44f364b803c9f062346e
src/utils/children.ts
src/utils/children.ts
import * as React from 'react'; const childrenToMap = (children: React.ReactNode): Map<string, React.ReactChild> => { const childrenArray = React.Children.toArray(children); const childMap: Map<string, React.ReactChild> = new Map(); childrenArray.forEach((child) => { childMap.set(child.key, child);...
Move helper funcs into file
Move helper funcs into file
TypeScript
mit
bkazi/react-layout-transition,bkazi/react-layout-transition,bkazi/react-layout-transition
--- +++ @@ -0,0 +1,22 @@ +import * as React from 'react'; + +const childrenToMap = (children: React.ReactNode): Map<string, React.ReactChild> => { + const childrenArray = React.Children.toArray(children); + const childMap: Map<string, React.ReactChild> = new Map(); + childrenArray.forEach((child) => { + ...
acb491ac38698bfa6d9d54bf177c70d05807b871
app/src/lib/enterprise.ts
app/src/lib/enterprise.ts
/** * The oldest officially supported version of GitHub Enterprise. * This information is used in user-facing text and shouldn't be * considered a hard limit, i.e. older versions of GitHub Enterprise * might (and probably do) work just fine but this should be a fairly * recent version that we can safely say that w...
Add a shared value for the minimum supported Enterprise version
Add a shared value for the minimum supported Enterprise version
TypeScript
mit
BugTesterTest/desktops,BugTesterTest/desktops,desktop/desktop,hjobrien/desktop,hjobrien/desktop,kactus-io/kactus,BugTesterTest/desktops,kactus-io/kactus,shiftkey/desktop,kactus-io/kactus,BugTesterTest/desktops,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,say25...
--- +++ @@ -0,0 +1,12 @@ +/** + * The oldest officially supported version of GitHub Enterprise. + * This information is used in user-facing text and shouldn't be + * considered a hard limit, i.e. older versions of GitHub Enterprise + * might (and probably do) work just fine but this should be a fairly + * recent vers...
285fb1fce59669b7e734765b1400a856dcf3d931
applebot-type-node/src/messageHandlers/twitchUptime.ts
applebot-type-node/src/messageHandlers/twitchUptime.ts
import MessageHandler from "../messageHandler"; import ExtendedInfo from "../extendedInfo"; import TwitchExtendedInfo from "../extendedInfos/twitchExtendedInfo"; import MessageFloodgate from "../messageFloodgate"; import fetch from "node-fetch"; import * as fs from "fs"; function readSettings(): Promise<string> { ret...
Fix case on TwitchUptime filename
Fix case on TwitchUptime filename
TypeScript
mit
Zogzer/Applebot,Zogzer/Applebot,Yen/Applebot
--- +++ @@ -0,0 +1,59 @@ +import MessageHandler from "../messageHandler"; +import ExtendedInfo from "../extendedInfo"; +import TwitchExtendedInfo from "../extendedInfos/twitchExtendedInfo"; +import MessageFloodgate from "../messageFloodgate"; +import fetch from "node-fetch"; +import * as fs from "fs"; + +function rea...
08f726e09ffa757fdbd72e3f77c0fbab165f4054
src/commands/simple/thrust.ts
src/commands/simple/thrust.ts
import { getCurrentBranchName, getRemotes } from '../../lib/git.ts'; import { exec, OutputMode } from '../../dependencies/exec.ts'; import { getBranchRemote } from '../../lib/git/getBranchRemote.ts'; interface Args { force: boolean, // Test thingies isTestRun: boolean, } export const command = 'thrust'; export...
import { getCurrentBranchName, getRemotes } from '../../lib/git.ts'; import { exec, OutputMode } from '../../dependencies/exec.ts'; import { getBranchRemote } from '../../lib/git/getBranchRemote.ts'; interface Args { force: boolean, // Test thingies isTestRun: boolean, } export const command = 'thrust'; export...
Fix set upstream conditional inversion
:bug: Fix set upstream conditional inversion
TypeScript
apache-2.0
quilicicf/Gut,quilicicf/Gut
--- +++ @@ -29,7 +29,7 @@ const remote = remotes[ 0 ]; // TODO: prompt user when there are multiple remotes const forceArg = force ? '--force-with-lease' : ''; - const setUpstreamArg = remoteOfTrackedBranch ? `--set-upstream ${remote}` : ''; + const setUpstreamArg = remoteOfTrackedBranch ? '' : `--set-upstr...
85fc817cc7689b833a71755967b1a11124769cbe
src/migration/types.ts
src/migration/types.ts
/** * Represent the data structure of a game in v1.0.0 */ export interface IOldGameData { /** * Current round of the game */ currentRound: number /** * The index of maker of this round. Points to the players array. */ maker: number /** * Array of players in the game */ players: IOldPlaye...
Add type interface for old data structures
Add type interface for old data structures
TypeScript
mit
Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc
--- +++ @@ -0,0 +1,75 @@ +/** + * Represent the data structure of a game in v1.0.0 + */ +export interface IOldGameData { + /** + * Current round of the game + */ + currentRound: number + /** + * The index of maker of this round. Points to the players array. + */ + maker: number + /** + * Array of playe...
8c02413227a31668f6ea394c8c8ac5526aab332c
src/client/app/components/admin/CreateUserComponent.tsx
src/client/app/components/admin/CreateUserComponent.tsx
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import * as React from 'react'; import HeaderContainer from '../../containers/HeaderContainer'; import FooterCompo...
Add stub component for creating users
Add stub component for creating users
TypeScript
mpl-2.0
OpenEnergyDashboard/OED,OpenEnergyDashboard/OED,OpenEnergyDashboard/OED,OpenEnergyDashboard/OED
--- +++ @@ -0,0 +1,17 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import * as React from 'react'; +import HeaderContainer from '../../containers/Hea...
b7d600778f988784dd75bb6a130201d00f4f68b0
lib/src/components/stretchyFlatList.tsx
lib/src/components/stretchyFlatList.tsx
import React from 'react'; import { View, Animated } from 'react-native'; import { commonStyles as styles } from './styles'; import { StretchyFlatListComponent } from '../types'; import { useStretchy } from '../hooks/useStretchy'; import { StretchyImage } from './stretchyImage'; export const StretchyFlatList: Stretchy...
Add new StretchyFlatList in TS format
Add new StretchyFlatList in TS format
TypeScript
mit
hamidhadi/react-native-stretchy,hamidhadi/react-native-stretchy,hamidhadi/react-native-stretchy,hamidhadi/react-native-stretchy
--- +++ @@ -0,0 +1,54 @@ +import React from 'react'; +import { View, Animated } from 'react-native'; +import { commonStyles as styles } from './styles'; +import { StretchyFlatListComponent } from '../types'; +import { useStretchy } from '../hooks/useStretchy'; +import { StretchyImage } from './stretchyImage'; + +expo...
cc99b300b0e5742a15a7909e25309e1821130796
src/common-ui/components/markdown-preview-insert-menu.tsx
src/common-ui/components/markdown-preview-insert-menu.tsx
import React from 'react' import styled from 'styled-components' import { MarkdownPreview, Props as MarkdownPreviewProps, } from './markdown-preview' interface MenuItemProps { name: string getTextToInsert: () => string } export interface Props extends MarkdownPreviewProps { menuItems: MenuItemPro...
Write MarkdownPreview wrapper with insert menu support
Write MarkdownPreview wrapper with insert menu support - includes base YT timestamp implementation + link insertion
TypeScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
--- +++ @@ -0,0 +1,121 @@ +import React from 'react' +import styled from 'styled-components' + +import { + MarkdownPreview, + Props as MarkdownPreviewProps, +} from './markdown-preview' + +interface MenuItemProps { + name: string + getTextToInsert: () => string +} + +export interface Props extends Markdow...
47de35b0f37c90df47d9107d64b1614adbe6bafb
src/scripts/exportChartDataNamespace.ts
src/scripts/exportChartDataNamespace.ts
// Script to export the data_values for all variables attached to charts import * as path from 'path' import * as db from '../db' import * as _ from 'lodash' import * as settings from '../settings' import { exec } from '../admin/serverUtil' const namespace = process.argv[2] if (!namespace) { const programName =...
Create a data export script for a namespace
Create a data export script for a namespace
TypeScript
mit
OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorld...
--- +++ @@ -0,0 +1,58 @@ +// Script to export the data_values for all variables attached to charts + +import * as path from 'path' +import * as db from '../db' +import * as _ from 'lodash' +import * as settings from '../settings' + +import { exec } from '../admin/serverUtil' + +const namespace = process.argv[2] + +if...
2c814f4413cbc83a88c711823b0aea5125e8d343
tests/cases/fourslash/jsdocNullableUnion.ts
tests/cases/fourslash/jsdocNullableUnion.ts
///<reference path="fourslash.ts" /> // @allowNonTsExtensions: true // @Filename: Foo.js //// //// * @param {never | {x: string}} p1 //// * @param {undefined | {y: number}} p2 //// * @param {null | {z: boolean}} p3 //// * @returns {void} nothing //// */ ////function f(p1, p2, p3) { //// p1./*1*/ //// p...
Add jsdoc nullable union test case to fourslash
Add jsdoc nullable union test case to fourslash
TypeScript
apache-2.0
erikmcc/TypeScript,TukekeSoft/TypeScript,RyanCavanaugh/TypeScript,DLehenbauer/TypeScript,Microsoft/TypeScript,nojvek/TypeScript,thr0w/Thr0wScript,SaschaNaz/TypeScript,basarat/TypeScript,donaldpipowitch/TypeScript,weswigham/TypeScript,vilic/TypeScript,vilic/TypeScript,RyanCavanaugh/TypeScript,erikmcc/TypeScript,Eyas/Typ...
--- +++ @@ -0,0 +1,23 @@ +///<reference path="fourslash.ts" /> +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// +//// * @param {never | {x: string}} p1 +//// * @param {undefined | {y: number}} p2 +//// * @param {null | {z: boolean}} p3 +//// * @returns {void} nothing +//// */ +////function f(p1, p2, p3) { ...
3478099a853d53ea166e0467c6b19293bf5325b9
tests/cases/fourslash/incrementalParsingInsertIntoMethod1.ts
tests/cases/fourslash/incrementalParsingInsertIntoMethod1.ts
/// <reference path='fourslash.ts' /> ////class C { //// public foo1() { } //// public foo2() { //// return 1/*1*/; //// } //// public foo3() { } ////} debugger; goTo.marker("1"); edit.insert(" + 1");
Add incremental parsing LS test.
Add incremental parsing LS test.
TypeScript
apache-2.0
tinganho/TypeScript,enginekit/TypeScript,plantain-00/TypeScript,jamesrmccallum/TypeScript,alexeagle/TypeScript,billti/TypeScript,matthewjh/TypeScript,DanielRosenwasser/TypeScript,Viromo/TypeScript,gonifade/TypeScript,webhost/TypeScript,chocolatechipui/TypeScript,msynk/TypeScript,SmallAiTT/TypeScript,nagyistoce/TypeScri...
--- +++ @@ -0,0 +1,13 @@ +/// <reference path='fourslash.ts' /> + +////class C { +//// public foo1() { } +//// public foo2() { +//// return 1/*1*/; +//// } +//// public foo3() { } +////} + +debugger; +goTo.marker("1"); +edit.insert(" + 1");
ad6847c0adbf438c7342ff0a8a08ab8c77110b7c
app/src/ui/history/drag-and-drop-intro.ts
app/src/ui/history/drag-and-drop-intro.ts
/** Type of the drag and drop intro popover. Each value represents a feature. */ export enum DragAndDropIntroType { CherryPick = 'cherry-pick', Squash = 'squash', Reorder = 'reorder', } /** Structure to describe the drag and drop intro popover. */ export type DragAndDropIntro = { readonly title: string reado...
Create new types for drag&drop intros
Create new types for drag&drop intros
TypeScript
mit
shiftkey/desktop,j-f1/forked-desktop,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,artivilla/desktop,artivilla/desktop,desktop/desktop,say25/desktop,shiftkey/desktop,say25/desktop,artivilla/desktop,say25/desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,desktop/desktop,desktop/desktop,shiftkey/deskt...
--- +++ @@ -0,0 +1,39 @@ +/** Type of the drag and drop intro popover. Each value represents a feature. */ +export enum DragAndDropIntroType { + CherryPick = 'cherry-pick', + Squash = 'squash', + Reorder = 'reorder', +} + +/** Structure to describe the drag and drop intro popover. */ +export type DragAndDropIntro ...
ff1877a9406f74ece24810a1c42e989847adc8b3
platforms/platform-alexa/src/cli/smapi/SkillPackageManagement.ts
platforms/platform-alexa/src/cli/smapi/SkillPackageManagement.ts
import { execAsync } from '@jovotech/cli-core'; import { UnknownObject } from '@jovotech/framework'; import { getAskError } from '../utilities'; export async function createNewUploadUrl(): Promise<string> { try { const { stdout } = await execAsync('ask smapi create-upload-url'); const uploadUrl: string = JSO...
Implement SMAPI Skill Package Management functions
:sparkles: Implement SMAPI Skill Package Management functions
TypeScript
apache-2.0
jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs
--- +++ @@ -0,0 +1,69 @@ +import { execAsync } from '@jovotech/cli-core'; +import { UnknownObject } from '@jovotech/framework'; +import { getAskError } from '../utilities'; + +export async function createNewUploadUrl(): Promise<string> { + try { + const { stdout } = await execAsync('ask smapi create-upload-url');...
28617b23fb93f3542fa8fc1208638c957403e876
extraterm/src/render_process/settings/frames/FrameRuleConfigUi.ts
extraterm/src/render_process/settings/frames/FrameRuleConfigUi.ts
/* * Copyright 2019 Simon Edwards <simon@simonzone.com> * * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file. */ import Component from 'vue-class-component'; import Vue from 'vue'; import { FrameRule } from '../../../Config'; import { trimBetweenTags } from 'extraterm-tr...
Add part of the frame config UI
Add part of the frame config UI
TypeScript
mit
sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm
--- +++ @@ -0,0 +1,60 @@ +/* + * Copyright 2019 Simon Edwards <simon@simonzone.com> + * + * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file. + */ +import Component from 'vue-class-component'; +import Vue from 'vue'; + +import { FrameRule } from '../../../Config'; +import {...
11843a76f28167f56c3ae08102c492bc1d60a98c
types/is-empty/is-empty-tests.ts
types/is-empty/is-empty-tests.ts
import isEmpty from 'is-empty'; isEmpty({}); isEmpty(null); isEmpty(undefined); isEmpty(9); isEmpty(new Object()); isEmpty(Array); isEmpty(''); isEmpty(() => {});
import isEmpty = require('is-empty'); isEmpty({}); isEmpty(null); isEmpty(undefined); isEmpty(9); isEmpty(new Object()); isEmpty(Array); isEmpty(''); isEmpty(() => {});
Change test to require isEmpty dependency
Change test to require isEmpty dependency
TypeScript
mit
dsebastien/DefinitelyTyped,rolandzwaga/DefinitelyTyped,mcliment/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,borisyankov/DefinitelyTyped,markogresak/DefinitelyTyped,AgentME/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,one-...
--- +++ @@ -1,4 +1,4 @@ -import isEmpty from 'is-empty'; +import isEmpty = require('is-empty'); isEmpty({}); isEmpty(null);
f759603a2b869aa7faf1559b11f10ae3355b838f
src/Test/Ast/EdgeCases/InlineOverlapping.ts
src/Test/Ast/EdgeCases/InlineOverlapping.ts
/// <reference path="../../../../typings/mocha/mocha.d.ts" /> /// <reference path="../../../../typings/chai/chai.d.ts" /> import { expect } from 'chai' import * as Up from '../../../index' import { insideDocumentAndParagraph } from '../Helpers' import { SyntaxNode } from '../../../SyntaxNodes/SyntaxNode' import { Link...
Add failing inline overlapping test
Add failing inline overlapping test
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,39 @@ +/// <reference path="../../../../typings/mocha/mocha.d.ts" /> +/// <reference path="../../../../typings/chai/chai.d.ts" /> + +import { expect } from 'chai' +import * as Up from '../../../index' +import { insideDocumentAndParagraph } from '../Helpers' +import { SyntaxNode } from '../../../Syn...
96a1146cdab67999add011ce79611b8544a9dcb2
sandboxed-module/sandboxed-module-tests.ts
sandboxed-module/sandboxed-module-tests.ts
// Type definitions for sandboxed-module v2.0.3 // Project: https://github.com/felixge/node-sandboxed-module // Definitions by: Sven Reglitzki <https://github.com/svi3c/> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <reference path="sandboxed-module.d.ts" /> import SandboxedModule = require("san...
Add some tests to sandboxed-module
Add some tests to sandboxed-module
TypeScript
mit
HPFOD/DefinitelyTyped,sclausen/DefinitelyTyped,markogresak/DefinitelyTyped,RX14/DefinitelyTyped,Dashlane/DefinitelyTyped,mcliment/DefinitelyTyped,isman-usoh/DefinitelyTyped,nakakura/DefinitelyTyped,raijinsetsu/DefinitelyTyped,Zzzen/DefinitelyTyped,stephenjelfs/DefinitelyTyped,flyfishMT/DefinitelyTyped,ryan10132/Definit...
--- +++ @@ -0,0 +1,28 @@ +// Type definitions for sandboxed-module v2.0.3 +// Project: https://github.com/felixge/node-sandboxed-module +// Definitions by: Sven Reglitzki <https://github.com/svi3c/> +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// <reference path="sandboxed-module.d.ts" /> + +im...
41055f98dd3b448c2307a11790575cd84a050cfa
tests/scheduling-messages/test00008.test.ts
tests/scheduling-messages/test00008.test.ts
import { getConsumer, getMessageManager, getProducer, getQueueManagerFrontend, } from '../common'; import { Message } from '../../src/message'; import { delay, promisifyAll } from 'bluebird'; test("Make sure scheduled messages aren't published if destination queue is deleted", async () => { const msg = new M...
Test scheduled messages publication when dst queue is deleted
Test scheduled messages publication when dst queue is deleted
TypeScript
mit
weyoss/redis-smq,weyoss/redis-smq,weyoss/redis-smq
--- +++ @@ -0,0 +1,39 @@ +import { + getConsumer, + getMessageManager, + getProducer, + getQueueManagerFrontend, +} from '../common'; +import { Message } from '../../src/message'; +import { delay, promisifyAll } from 'bluebird'; + +test("Make sure scheduled messages aren't published if destination queue is delete...
7eb891eac465593decd867286dbb8075b57847eb
app/pages/_document.tsx
app/pages/_document.tsx
import Document, { Html, Head, Main, NextScript, DocumentContext, } from "next/document"; class MyDocument extends Document { static async getInitialProps(ctx: DocumentContext) { const initialProps = await Document.getInitialProps(ctx); return { ...initialProps }; } render() { return ( ...
Add document to make sure lang is set correctly
Add document to make sure lang is set correctly
TypeScript
apache-2.0
thenickreynolds/popcorngif,thenickreynolds/popcorngif
--- +++ @@ -0,0 +1,28 @@ +import Document, { + Html, + Head, + Main, + NextScript, + DocumentContext, +} from "next/document"; + +class MyDocument extends Document { + static async getInitialProps(ctx: DocumentContext) { + const initialProps = await Document.getInitialProps(ctx); + return { ...initialProp...
767ae358b41dea810ce14844b135540055c283f4
src/apps/rss/index.ts
src/apps/rss/index.ts
import express from 'express' import redis from 'redis' import apolloMiddleware from 'v2/apollo/middleware' import withStaticRouter from 'v2/hocs/WithStaticRouter' import pageResolver from 'v2/components/UI/XmlPage/resolver' import { Routes } from './Routes' import { REDIS_URL } from 'config.js' const client = redis....
Rename directory and clean up
Rename directory and clean up
TypeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
--- +++ @@ -0,0 +1,71 @@ +import express from 'express' +import redis from 'redis' +import apolloMiddleware from 'v2/apollo/middleware' +import withStaticRouter from 'v2/hocs/WithStaticRouter' +import pageResolver from 'v2/components/UI/XmlPage/resolver' +import { Routes } from './Routes' + +import { REDIS_URL } from...
43a2d9a4539e45e6438c17f5838d2e9d9db9bd2d
src/Test/Ast/PlusMinusSign.ts
src/Test/Ast/PlusMinusSign.ts
import { expect } from 'chai' import Up from '../../index' import { insideDocumentAndParagraph } from './Helpers' import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode' context('A plus symbol followed by a hyphen normally produces a plus-minus sign', () => { context('This applies within regular text:', () ...
Add 4 failing plus-minus tests
Add 4 failing plus-minus tests
TypeScript
mit
start/up,start/up
--- +++ @@ -0,0 +1,37 @@ +import { expect } from 'chai' +import Up from '../../index' +import { insideDocumentAndParagraph } from './Helpers' +import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode' + + +context('A plus symbol followed by a hyphen normally produces a plus-minus sign', () => { + context('This...
a747a00ade018175d794cf7a94e43b06663c9059
packages/@ember/deprecated-features/index.ts
packages/@ember/deprecated-features/index.ts
/* eslint-disable no-implicit-coercion */ // These versions should be the version that the deprecation was _introduced_, // not the version that the feature will be removed. export const SEND_ACTION = !!'3.4.0'; export const EMBER_EXTEND_PROTOTYPES = !!'3.2.0-beta.5'; export const RUN_SYNC = !!'3.0.0-beta.4'; export ...
/* eslint-disable no-implicit-coercion */ // These versions should be the version that the deprecation was _introduced_, // not the version that the feature will be removed. export const SEND_ACTION = !!'3.4.0'; export const EMBER_EXTEND_PROTOTYPES = !!'3.2.0-beta.5'; export const RUN_SYNC = !!'3.0.0-beta.4'; export ...
Fix version for APP_CTRL_ROUTER_PROPS deprecation flag
[BETA] Fix version for APP_CTRL_ROUTER_PROPS deprecation flag
TypeScript
mit
asakusuma/ember.js,miguelcobain/ember.js,stefanpenner/ember.js,givanse/ember.js,elwayman02/ember.js,givanse/ember.js,miguelcobain/ember.js,asakusuma/ember.js,tildeio/ember.js,mfeckie/ember.js,fpauser/ember.js,sandstrom/ember.js,GavinJoyce/ember.js,elwayman02/ember.js,cibernox/ember.js,sly7-7/ember.js,knownasilya/ember....
--- +++ @@ -12,4 +12,4 @@ export const COMPONENT_MANAGER_STRING_LOOKUP = !!'3.8.0'; export const JQUERY_INTEGRATION = !!'3.9.0'; export const ALIAS_METHOD = !!'3.9.0'; -export const APP_CTRL_ROUTER_PROPS = !!'4.0.0'; +export const APP_CTRL_ROUTER_PROPS = !!'3.10.0';
29bf3b2414e2a611ee98fda86b9256016a908fa1
rethinkdb/rethinkdb-tests.ts
rethinkdb/rethinkdb-tests.ts
/// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb") r.connect({host:"localhost", port: 28015}, function(err, conn) { console.log("HI", err, conn) var testDb = r.db('test') testDb.tableCreate('users').run(conn, function(err, stuff) { var users = testDb.table('users') us...
/// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb"); r.connect({ host: "localhost", port: 28015 }, function(err, conn) { console.log("HI", err, conn); const testDb = r.db("test"); testDb.tableCreate("users").run(conn, function(err, stuff) { const users = testDb.table("users")...
Clean up the listing issues in the test
[rethinkdb] Clean up the listing issues in the test
TypeScript
mit
alexdresko/DefinitelyTyped,use-strict/DefinitelyTyped,YousefED/DefinitelyTyped,borisyankov/DefinitelyTyped,isman-usoh/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,rolandzwaga/DefinitelyTyped,jimthedev/DefinitelyTyped,damianog/DefinitelyTyped,HPFOD/DefinitelyTyped,ashwinr/Definitely...
--- +++ @@ -1,17 +1,20 @@ /// <reference path="rethinkdb.d.ts" /> -import r = require("rethinkdb") +import r = require("rethinkdb"); -r.connect({host:"localhost", port: 28015}, function(err, conn) { - console.log("HI", err, conn) - var testDb = r.db('test') - testDb.tableCreate('users').run(conn, functi...
89030a176258b6fe26903c7996c2dc1a8cb64ada
source/message/messagebus.ts
source/message/messagebus.ts
/** * A convenience singleton to convey messages around the system. * Typically the view will grab a handle on this and propogate * the messages to the UI. Because it is a singleton anything can * grab a handle and start spitting out messages. * * Neither the consumer or the emitter is aware of each other so * i...
Create the message bus singleton
Create the message bus singleton
TypeScript
apache-2.0
Tomella/cossap-3d,Tomella/cossap-3d,Tomella/cossap-3d,Tomella/cossap-3d
--- +++ @@ -0,0 +1,62 @@ +/** + * A convenience singleton to convey messages around the system. + * Typically the view will grab a handle on this and propogate + * the messages to the UI. Because it is a singleton anything can + * grab a handle and start spitting out messages. + * + * Neither the consumer or the emit...
e3f2d8a9b3c5b685c923150ba4a2283e114cfc24
server/api/redis.ts
server/api/redis.ts
import * as eta from "../../eta"; import * as redis from "redis"; const client: redis.RedisClient = undefined; export default client; export function connect(): redis.RedisClient { const tempClient: redis.RedisClient = redis.createClient(eta.config.http.session.port, eta.config.http.session.host); tempClient....
Add Redis API for Eta
Add Redis API for Eta
TypeScript
mit
crossroads-education/eta,crossroads-education/eta
--- +++ @@ -0,0 +1,16 @@ +import * as eta from "../../eta"; +import * as redis from "redis"; + +const client: redis.RedisClient = undefined; +export default client; + +export function connect(): redis.RedisClient { + const tempClient: redis.RedisClient = redis.createClient(eta.config.http.session.port, eta.config....
70ca18e91c507fb3f088866109f04ac89f74d6ed
tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx
tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx
// @filename: file.tsx // @jsx: preserve // @module: amd // @noLib: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') export interface ClickableProps { children?: string; className?: string; } export interface ButtonProps extends ClickableProps { onClick: (k: "left" | ...
Add a test for contextual type in JSXAttributes
Add a test for contextual type in JSXAttributes
TypeScript
apache-2.0
donaldpipowitch/TypeScript,basarat/TypeScript,kitsonk/TypeScript,kitsonk/TypeScript,Eyas/TypeScript,SaschaNaz/TypeScript,alexeagle/TypeScript,chuckjaz/TypeScript,mihailik/TypeScript,kpreisser/TypeScript,DLehenbauer/TypeScript,donaldpipowitch/TypeScript,donaldpipowitch/TypeScript,synaptek/TypeScript,synaptek/TypeScript,...
--- +++ @@ -0,0 +1,42 @@ +// @filename: file.tsx +// @jsx: preserve +// @module: amd +// @noLib: true +// @libFiles: react.d.ts,lib.d.ts + +import React = require('react') + +export interface ClickableProps { + children?: string; + className?: string; +} + +export interface ButtonProps extends ClickableProps {...
dccc6f867f2e926c4ebd5b1ee5bc8d15d61a3382
src/components/CalendarHeatMap/CompletedHitItem.tsx
src/components/CalendarHeatMap/CompletedHitItem.tsx
import * as React from 'react'; import { RootState, HitDatabaseEntry } from '../../types'; import { connect, Dispatch } from 'react-redux'; import { EditBonus, editBonus } from '../../actions/bonus'; import { ResourceList } from '@shopify/polaris'; export interface OwnProps { readonly id: string; } export interface...
Add ResourceList.Item as a connected component to display each completed HIT on a particular day.
Add ResourceList.Item as a connected component to display each completed HIT on a particular day.
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
--- +++ @@ -0,0 +1,37 @@ +import * as React from 'react'; +import { RootState, HitDatabaseEntry } from '../../types'; +import { connect, Dispatch } from 'react-redux'; +import { EditBonus, editBonus } from '../../actions/bonus'; +import { ResourceList } from '@shopify/polaris'; + +export interface OwnProps { + reado...