Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit a476cf3

Browse files
committed
Cleanup of files and adding coverage info
1 parent 406eccc commit a476cf3

File tree

12 files changed

+139
-103
lines changed

12 files changed

+139
-103
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ jobs:
66
steps:
77
- checkout
88
- run: npm ci
9-
- run: npm test
9+
- run: npm test && npx codecov

N/currentRecord.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Return a Netsuite Record Module
2+
* Return a Netsuite Current Record Module
33
*
4-
* @classDescription Record object
4+
* @classDescription Current Record object
55
* @constructor
66
* @returns {N/Module}
77
*/

N/http.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/**
22
* Return a Netsuite HTTP Module
33
*
4-
* @classDescription HTTP object
5-
* @constructor
6-
* @returns {N/http}
74
*/
85

96
module.exports = {

N/https.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/**
2-
* Return a Netsuite HTTP Module
2+
* Return a Netsuite HTTPS Module
33
*
4-
* @classDescription HTTP object
5-
* @constructor
6-
* @returns {N/http}
74
*/
85

96
module.exports = {

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<a href="https://github.com/airbnb/javascript"><img src="https://badgen.net/badge/code%20style/airbnb-base/green" /></a>
88
<a href="LICENSE"><img src="https://badgen.net/github/license/mycshq/ns-suitescript-mocks" /></a>
99
<a href="http://makeapullrequest.com"><img src="https://badgen.net/badge/PRs/Welcome/green" /></a>
10-
<a href='https://coveralls.io/github/mycsHQ/ns-suitescript-mocks?branch=master'><img src='https://coveralls.io/repos/github/mycsHQ/ns-suitescript-mocks/badge.svg?branch=master' alt='Coverage Status' /></a>
11-
10+
<a href="https://codecov.io/gh/mycshq/ns-suitescript-mocks"><img src="https://codecov.io/gh/mycshq/ns-suitescript-mocks/branch/master/graph/badge.svg" /></a>
1211
</p>
1312
<p align="center">
1413
<a href="https://nodei.co/npm/ns-suitescript-mocks/"><img src="https://nodei.co/npm/ns-suitescript-mocks.png" /></a>

Tests/N/currentRecord.test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Tests for a Netsuite format Module
3+
*
4+
*/
5+
6+
const fileUnderTest = require('../../N/currentRecord');
7+
8+
describe('Testing currentRecord module', () => {
9+
it('Should return object with properies available in Netsuite\'s current record module ', () => {
10+
const expected = {
11+
attach: expect.any(Function),
12+
create: expect.any(Function),
13+
copy: expect.any(Function),
14+
delete: expect.any(Function),
15+
detach: expect.any(Function),
16+
get: expect.any(Function),
17+
load: expect.any(Function),
18+
submitFields: expect.any(Function),
19+
transform: expect.any(Function),
20+
Type: expect.any(Object),
21+
};
22+
expect(fileUnderTest).toMatchObject(expected);
23+
});
24+
});

Tests/N/https.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Tests for a Netsuite https Module
3+
*
4+
*/
5+
6+
const fileUnderTest = require('../../N/https');
7+
8+
describe('Testing http module', () => {
9+
it('Should return object with properies available in Netsuite\'s https module ', () => {
10+
const expected = {
11+
post: expect.any(Function),
12+
get: expect.any(Function),
13+
delete: expect.any(Function),
14+
};
15+
expect(fileUnderTest).toMatchObject(expected);
16+
});
17+
});

Tests/Utils/request.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
/**
42
* Tests for a request function
53
*

Utils/define.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const fs = require('fs');
1010
const rawRecord = require('../Utils/record');
1111
const logModule = require('../N/log');
1212
const Request = require('../Utils/request');
13+
1314
const external = {};
1415
let extendedModules = {};
1516

@@ -20,7 +21,7 @@ global.mapModules = {
2021
// Utils
2122
rawRecord,
2223
logModule,
23-
Request
24+
Request,
2425
};
2526

2627
/**

codecov.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
status:
11+
project: yes
12+
patch: yes
13+
changes: no
14+
15+
parsers:
16+
gcov:
17+
branch_detection:
18+
conditional: yes
19+
loop: yes
20+
method: no
21+
macro: no
22+
23+
comment:
24+
layout: "header, diff"
25+
behavior: default
26+
require_changes: no

0 commit comments

Comments
 (0)