mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
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:
parent
555ea54770
commit
9608cfb4ef
@ -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", () => {
|
||||
|
||||
10
jasmine-fixture/index.d.ts
vendored
10
jasmine-fixture/index.d.ts
vendored
@ -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 {
|
||||
|
||||
@ -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", () => {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
react-highlighter/index.d.ts
vendored
3
react-highlighter/index.d.ts
vendored
@ -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
2
redux-ui/index.d.ts
vendored
@ -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,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:
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user