Skip to content

chore(tests): test for async support #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.log
node_modules
spec/asyncAwaitSpec.js
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@
],
"author": "Julie Ralph <[email protected]>",
"devDependencies": {
"jshint": "2.5.0",
"jasmine": "2.4.1",
"selenium-webdriver": "2.52.0"
"jshint": "2.5.0",
"selenium-webdriver": "2.52.0",
"typescript": "^1.8.10"
},
"repository": {
"type": "git",
"url": "git://github.com/angular/jasminewd.git"
},
"main": "index.js",
"scripts": {
"pretest": "node_modules/.bin/jshint index.js spec",
"pretest": "node_modules/.bin/jshint index.js spec --exclude spec/asyncAwaitSpec.js; tsc -t ES2015 spec/asyncAwaitSpec.ts",
"test": "scripts/test.sh"
},
"license": "MIT",
Expand Down
16 changes: 16 additions & 0 deletions spec/asyncAwaitSpec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";

declare var describe;
declare var it;
declare var expect;

async function asyncHelper() {
return 7;
}

describe('async function', function() {
it('should wait on async functions', async function() {
let helperVal = await asyncHelper();
expect(helperVal).toBe(7);
});
});
3 changes: 2 additions & 1 deletion spec/support/passing_specs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"spec_dir": "spec",
"spec_files": [
"adapterSpec.js"
"adapterSpec.js",
"asyncAwaitSpec.js"
]
}