Skip to content

Commit

Permalink
Test types.
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthkh committed Jul 1, 2020
1 parent 409b4ed commit b89a685
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion examples/fundamentals__typescript/cypress/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/// <reference types="cypress" />
// reference code is written like below to avoid the clash in mocha types.
// in most of the cases, simple <reference types="cypress" /> will do.
/// <reference path="../../../node_modules/cypress/types/cy-blob-util.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cy-bluebird.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cy-moment.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cy-minimatch.d.ts" />
/// <reference path="../../../node_modules/cypress/types/lodash/index.d.ts" />
/// <reference path="../../../node_modules/cypress/types/sinon/index.d.ts" />
/// <reference path="../../../node_modules/cypress/types/jquery/index.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cypress.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cypress-type-helpers.d.ts" />
/// <reference path="../../../node_modules/cypress/types/cypress-global-vars.d.ts" />

declare namespace Cypress {
interface Chainable<Subject=any> {
Expand Down
5 changes: 4 additions & 1 deletion examples/fundamentals__typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"scripts": {
"cypress:open": "../../node_modules/.bin/cypress open",
"cypress:run": "../../node_modules/.bin/cypress run",
"lint": "../../node_modules/.bin/tslint --project ./tsconfig.json",
"postlint": "npm run tsc",
"test:ci": "../../node_modules/.bin/cypress run",
"test:ci:windows": "bin-up cypress run"
"test:ci:windows": "bin-up cypress run",
"tsc": "../../node_modules/.bin/tsc --pretty --noEmit"
}
}
6 changes: 6 additions & 0 deletions examples/fundamentals__typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"include": [
"cypress/integration/*.ts",
"cypress/integration/**/*.ts",
]
}

0 comments on commit b89a685

Please sign in to comment.