1 | import {bind, provide} from 'angular2/src/core/di';
|
2 | import {Options} from './common';
|
3 |
|
4 | export * from './common';
|
5 | export {SeleniumWebDriverAdapter} from './src/webdriver/selenium_webdriver_adapter';
|
6 |
|
7 | var fs = require('fs');
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | Options.DEFAULT_PROVIDERS.push(bind(Options.WRITE_FILE).toValue(writeFile));
|
15 |
|
16 | function writeFile(filename, content): Promise<any> {
|
17 | return new Promise(function(resolve, reject) {
|
18 | fs.writeFile(filename, content, (error) => {
|
19 | if (error) {
|
20 | reject(error);
|
21 | } else {
|
22 | resolve();
|
23 | }
|
24 | });
|
25 | })
|
26 | }
|