Fix packages that used 'jasmine' for tests.

Jasmine requires TypeScript 2.1, but since these packages only use it for tests, they should stop depending on it and stay TS2.0 compatible.
Similar for 'react'.
This commit is contained in:
Andy Hanson 2017-02-23 08:41:38 -08:00
parent 555ea54770
commit 9608cfb4ef
10 changed files with 39 additions and 18 deletions

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", () => {

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 {

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", () => {

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;

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");

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
redux-ui/index.d.ts vendored
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> {

View File

@ -1,5 +1,4 @@
import Reflux = require("reflux");
import React = require("react");
var syncActions = Reflux.createActions([
"statusUpdate",

View File

@ -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:

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