aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcaleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu>2022-03-06 19:05:34 -0500
committercaleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu>2022-03-06 19:05:34 -0500
commiteaa2b97a8c6077ba7f2610eb7c7f394a62e433ec (patch)
treefb23de1891e8bee11a8ae76d1de6ba2505cfbba6
parentce2dda018d8dcdf7b4be8c52886fb56bfe7bdf00 (diff)
Lint!
-rw-r--r--jest.config.js6
-rw-r--r--webAO/iniParse.test.js53
2 files changed, 29 insertions, 30 deletions
diff --git a/jest.config.js b/jest.config.js
index b7462c4..2506cf3 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -23,7 +23,7 @@ module.exports = {
// collectCoverageFrom: undefined,
// The directory where Jest should output its coverage files
- coverageDirectory: "coverage",
+ coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
@@ -31,7 +31,7 @@ module.exports = {
// ],
// Indicates which provider should be used to instrument code for coverage
- coverageProvider: "babel",
+ coverageProvider: 'babel',
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
@@ -137,7 +137,7 @@ module.exports = {
// snapshotSerializers: [],
// The test environment that will be used for testing
- testEnvironment: "jsdom",
+ testEnvironment: 'jsdom',
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
diff --git a/webAO/iniParse.test.js b/webAO/iniParse.test.js
index a96cb5d..a48be95 100644
--- a/webAO/iniParse.test.js
+++ b/webAO/iniParse.test.js
@@ -1,4 +1,4 @@
-import iniParse from './iniParse'
+import iniParse from './iniParse';
const iniExample = `
[Options]
@@ -8,32 +8,32 @@ showname = Matty
[Emotions]
number = 9
1 = Normal#-#normal#0#1
-`
+`;
describe('iniParse', () => {
- test('should not lowercase value if key is showname', () => {
- const parsedIni = iniParse(`
+ test('should not lowercase value if key is showname', () => {
+ const parsedIni = iniParse(`
[test]
showname = MATT
- `)
- expect(parsedIni.test.showname).toBe('MATT')
- })
- test('should lowercase value if key is not showname', () => {
- const parsedIni = iniParse(`
+ `);
+ expect(parsedIni.test.showname).toBe('MATT');
+ });
+ test('should lowercase value if key is not showname', () => {
+ const parsedIni = iniParse(`
[test]
party = TIME
- `)
- expect(parsedIni.test.party).toBe('time')
- })
- test('should parse sections', () => {
- const parsedIni = iniParse(iniExample)
- expect(Object.keys(parsedIni).length).toBe(2);
- });
- test('should parse parameters', () => {
- const parsedIni = iniParse(iniExample)
- expect(Object.keys(parsedIni.options).length).toBe(2);
- })
- test('should remove empty lines', () => {
- const parsedIni = iniParse(`
+ `);
+ expect(parsedIni.test.party).toBe('time');
+ });
+ test('should parse sections', () => {
+ const parsedIni = iniParse(iniExample);
+ expect(Object.keys(parsedIni).length).toBe(2);
+ });
+ test('should parse parameters', () => {
+ const parsedIni = iniParse(iniExample);
+ expect(Object.keys(parsedIni.options).length).toBe(2);
+ });
+ test('should remove empty lines', () => {
+ const parsedIni = iniParse(`
[test]
@@ -41,8 +41,7 @@ describe('iniParse', () => {
2 = 2
- `)
- expect(Object.keys(parsedIni.test).length).toBe(2)
- })
-})
-
+ `);
+ expect(Object.keys(parsedIni.test).length).toBe(2);
+ });
+});