Merge pull request #14819 from DefinitelyTyped/jasmine_tests

Fix packages that used 'jasmine' for tests.
This commit is contained in:
Mine Starks
2017-03-07 14:35:57 -08:00
committed by GitHub
10 changed files with 39 additions and 18 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/// <reference types="jasmine" />
declare function describe(desc: string, fn: () => void): void;
declare function it(desc: string, fn: () => void): void;
describe("tester Google Analytics Tracker _gat object", () => {
it("can set ga script element", () => {
+7 -3
View File
@@ -2,10 +2,14 @@
// Project: https://github.com/searls/jasmine-fixture
// Definitions by: Craig Brett <https://github.com/craigbrett17/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/** Affixes the given jquery selectors into the body and will be removed after each spec
* @param {string} selector The JQuery selector to be added to the dom
*/
/// <reference types="jasmine" />
/**
* Affixes the given jquery selectors into the body and will be removed after each spec
* @param {string} selector The JQuery selector to be added to the dom
*/
declare function affix(selector: string): JQuery;
interface JQuery {
-2
View File
@@ -1,8 +1,6 @@
/// <reference types="jasmine" />
/// <reference types="jquery" />
/// <reference types="jasmine-jquery" />
describe("Jasmine fixture extension", () => {
describe("Affixes dom elements to body", () => {
it("Inserts a new element on affix", () => {
+16 -1
View File
@@ -1,6 +1,21 @@
/// <reference types="jasmine" />
import Qty from "js-quantities";
declare function describe(desc: string, fn: () => void): void;
declare function it(desc: string, fn: () => void): void;
interface Expect<T> {
not: this;
toBe(y: T): void;
toEqual(y: T): void;
toBeTruthy(): void;
toBeNull(): void;
toBeCloseTo(this: Expect<number>, x: number, sigFigs: number): void;
toThrow(this: Expect<() => void>, msg?: string): void;
toContain<U>(this: Expect<U[]>, x: U): void;
};
declare function expect<T>(x: T): Expect<T>;
declare function beforeEach(f: () => void): void;
declare function afterEach(f: () => void): void;
// From project readme
let qty: Qty;
+3 -2
View File
@@ -1,7 +1,8 @@
/// <reference types="jasmine" />
import * as ga from "react-ga";
declare function describe(desc: string, f: () => void): void;
declare function it(desc: string, f: () => void): void;
describe("Testing react-ga initialize object", () => {
it("Able to initialize react-ga object", () => {
ga.initialize("UA-65432-1");
+3
View File
@@ -2,6 +2,9 @@
// Project: https://github.com/helior/react-highlighter
// Definitions by: Pedro Pereira <https://github.com/oizie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="react" />
declare var Highlight: any;
export = Highlight;
+2
View File
@@ -2,7 +2,9 @@
// Project: https://github.com/tonyhb/redux-ui
// Definitions by: Andy Shu Xin <https://github.com/andyshuxin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="react" />
import * as Redux from 'redux';
export interface uiParams<UIStateShape> {
-1
View File
@@ -1,5 +1,4 @@
import Reflux = require("reflux");
import React = require("react");
var syncActions = Reflux.createActions([
"statusUpdate",
@@ -1,9 +1,9 @@
/// <reference types="jasmine" />
import * as request from 'supertest-as-promised';
import * as express from 'express';
declare function describe(desc: string, f: () => void): void;
declare function it(desc: string, f: () => void): void;
var app = express();
// chain your requests like you were promised:
+3 -4
View File
@@ -1,8 +1,7 @@
// ReSharper disable InconsistentNaming
// ReSharper disable WrongExpressionStatement
/// <reference types="node"/>
/// <reference types="jasmine" />
declare function describe(desc: string, f: () => void): void;
declare function it(desc: string, f: () => void): void;
// tests adapted from/for tcomb's test folder