Skip to content

Commit 601b17a

Browse files
author
Serhat Bolsu
committed
Test data import sample added
1 parent 6043ae3 commit 601b17a

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
'Atomics': 'readonly',
1414
'SharedArrayBuffer': 'readonly',
1515
},
16-
'parserOptions': {
16+
'parserOptions': {
17+
'sourceType': 'module',
1718
'ecmaVersion': 2018,
1819
},
1920
'rules': {

data/testData.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"endPoint": "/weatherapi",
3+
"specialProperty": "password"
4+
}

test/basic_utilities.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// notice the usage of ES6 syntax. alternative import is below
2+
import testData from '../data/testData';
3+
// const testData = require('../data/testData');
4+
5+
6+
describe('Utilities', function() {
7+
it('should get test data from file', function() {
8+
expect(testData).toHaveProperty('endPoint');
9+
expect(testData.specialProperty).toBe('password');
10+
});
11+
});

0 commit comments

Comments
 (0)