From 889902202dfb2a550df7f94f770b1c5e42ab5638 Mon Sep 17 00:00:00 2001 From: Steve King Date: Mon, 17 Jun 2019 08:23:02 +0100 Subject: [PATCH] Rename all tests to remove the `test ` prefix --- test/bind-to-server.spec.js | 4 ++-- test/reader.spec.js | 32 ++++++++++++++++---------------- test/section.spec.js | 10 +++++----- test/writer.spec.js | 12 ++++++------ 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/test/bind-to-server.spec.js b/test/bind-to-server.spec.js index 29ab934..a67ada0 100644 --- a/test/bind-to-server.spec.js +++ b/test/bind-to-server.spec.js @@ -17,7 +17,7 @@ describe('bind-to-server', () => { afterEach(() => tempFile.tearDown()); - it('test Creates directories when necessary - absolute paths', () => { + it('Creates directories when necessary - absolute paths', () => { const dirPath = tempFile.pushDir('/tmp/' + Math.floor(Math.random() * 1e10).toString(16)); const app = {set: spy()}; @@ -32,7 +32,7 @@ describe('bind-to-server', () => { expect(require('fs').statSync(dirPath).isDirectory()).to.be.ok(); }); - it('test Creates directories when necessary - relative paths', () => { + it('Creates directories when necessary - relative paths', () => { const dirName = Math.floor(Math.random() * 1e10).toString(16); const dirBase = process.cwd(); const dirPath = tempFile.pushDir(dirBase + '/' + dirName); diff --git a/test/reader.spec.js b/test/reader.spec.js index bcb2d33..9c73745 100644 --- a/test/reader.spec.js +++ b/test/reader.spec.js @@ -17,12 +17,12 @@ describe('Reader', () => { afterEach(() => tempFile.tearDown()); - it('test Able to read from a file', () => { + it('Able to read from a file', () => { givenTheProperties('some.property=Value'); expect(properties.get('some.property')).to.be('Value'); }); - it('test Merges multiple files', () => { + it('Merges multiple files', () => { givenTheProperties('some.property=Value'); tempFile('[section]\nsome.property=Another Value'); @@ -32,7 +32,7 @@ describe('Reader', () => { expect(properties.get('some.property')).to.be('Value'); }); - it('test Runs a function across all items in the reader', () => { + it('Runs a function across all items in the reader', () => { givenTheProperties( 'a = 123\n' + 'b = true\n' @@ -51,7 +51,7 @@ describe('Reader', () => { } }); - it('test Attempts type coercion', () => { + it('Attempts type coercion', () => { givenTheProperties( 'a = 123\n' + 'b = true\n' + @@ -63,12 +63,12 @@ describe('Reader', () => { expect(properties.get('d')).to.be(0.1); }); - it('test Correctly handles values that are nothing but whitespace', () => { + it('Correctly handles values that are nothing but whitespace', () => { givenTheProperties('a = \n'); expect(properties.getRaw('a')).to.be(''); }); - it('test Allows access to non-parsed values', () => { + it('Allows access to non-parsed values', () => { givenTheProperties(` a = 123 b = true @@ -81,7 +81,7 @@ describe('Reader', () => { expect(properties.getRaw('d')).to.be('0.1'); }); - it('test Properties are trimmed when parsed', () => { + it('Properties are trimmed when parsed', () => { givenTheProperties(` some.property =Value foo.bar = A Value`); @@ -90,20 +90,20 @@ describe('Reader', () => { expect(properties.get('foo.bar')).to.be('A Value'); }); - it('test Blank lines are ignored', () => { + it('Blank lines are ignored', () => { givenTheProperties('\n\nsome.property=Value\n\nfoo.bar = A Value'); expect(properties.length).to.be(2); }); - it('test Properties can be read back via their dot notation names', () => { + it('Properties can be read back via their dot notation names', () => { givenTheProperties('\n\nsome.property=Value\n\nfoo.bar = A Value'); expect(properties.path().some.property).to.be('Value'); expect(properties.path().foo.bar).to.be('A Value'); }); - it('test Sets properties into an app', () => { + it('Sets properties into an app', () => { const app = {set: spy()}; givenTheProperties(` some.property=Value @@ -114,7 +114,7 @@ describe('Reader', () => { expect(app.set.withArgs('foo.bar', 'A Value').calledOnce).to.be.ok(); }); - it('test Permits escaped new line characters', () => { + it('Permits escaped new line characters', () => { givenTheProperties('\n\nsome.property= Multi\\n Line \\nString \nfoo.bar = A Value'); // parsed access modifies the new line characters @@ -126,7 +126,7 @@ describe('Reader', () => { expect(properties.path().some.property).to.be('Multi\\n Line \\nString'); }); - it('test Returns null when getting a missing property', () => { + it('Returns null when getting a missing property', () => { givenTheProperties('prop = value'); // parsed access modifies the new line characters @@ -134,7 +134,7 @@ describe('Reader', () => { expect(properties.get('missing')).to.be(null); }); - it('test getByRoot when getting a bunch of objects', () => { + it('getByRoot when getting a bunch of objects', () => { givenTheProperties(` root.sect.a = 1 root.sect.b = bar @@ -154,7 +154,7 @@ describe('Reader', () => { ); }); - it('test getByRoot when names are sub strings', () => { + it('getByRoot when names are sub strings', () => { givenTheProperties(` root.sect.a = 1 @@ -170,7 +170,7 @@ describe('Reader', () => { }); }); - it('test getAllProperties returns properties map', () => { + it('getAllProperties returns properties map', () => { givenTheProperties(` root.a.b = Hello @@ -184,7 +184,7 @@ describe('Reader', () => { }); }); - it('test getAllProperties is immutable', () => { + it('getAllProperties is immutable', () => { givenTheProperties(` root.a.b = Hello diff --git a/test/section.spec.js b/test/section.spec.js index b7e1b96..4ca572a 100644 --- a/test/section.spec.js +++ b/test/section.spec.js @@ -16,7 +16,7 @@ describe('section', () => { afterEach(() => tempFile.tearDown()); - it('test Able to read URLs as part of a section', () => { + it('Able to read URLs as part of a section', () => { givenTheProperties(` [foo] base.api.url=http://blah.com @@ -33,7 +33,7 @@ thing = 123 expect(properties.get('another.thing')).to.be(123); }); - it('test Able to read file with sections that are already properties', () => { + it('Able to read file with sections that are already properties', () => { givenTheProperties(` some = thing section = value @@ -47,7 +47,7 @@ thing = 123 expect(properties.path().section).to.eql({'': 'value', 'sub': 'property'}); }); - it('test Ignores comment blocks', () => { + it('Ignores comment blocks', () => { givenTheProperties(` some = thing @@ -60,7 +60,7 @@ thing = 123 expect(properties.get('section')).to.be('another value'); }); - it('test Able to read from a file with sections', () => { + it('Able to read from a file with sections', () => { givenTheProperties(` some.property = Value @@ -77,7 +77,7 @@ thing = 123 expect(properties.path().blah.another.property).to.be('Something Else'); }); - it('test Able use section names with white space', () => { + it('Able use section names with white space', () => { givenTheProperties(` some.property = Value diff --git a/test/writer.spec.js b/test/writer.spec.js index 356515b..f9f003d 100644 --- a/test/writer.spec.js +++ b/test/writer.spec.js @@ -16,7 +16,7 @@ describe('writer', () => { afterEach(() => tempFile.tearDown()); - it('test Able to stringify properties', () => { + it('Able to stringify properties', () => { givenTheProperties(` property = Value `); @@ -26,7 +26,7 @@ describe('writer', () => { expect(propertiesStringsArray).to.eql(['property=Value']); }); - it('test Able to stringify properties with section', () => { + it('Able to stringify properties with section', () => { givenTheProperties(` [main] property=Value @@ -37,7 +37,7 @@ describe('writer', () => { expect(propertiesStringsArray).to.eql(['[main]', 'property=Value']); }); - it( 'test Able to stringify properties with the few sections', () => { + it( 'Able to stringify properties with the few sections', () => { const inputContent = ` property1=Value1 @@ -59,7 +59,7 @@ property4=Value4 expect(propertiesStringsArray).to.eql(inputContent.trim().split('\n').filter(Boolean)); }); - it( 'test Able to stringify properties after set', () => { + it( 'Able to stringify properties after set', () => { givenTheProperties('property=Value'); properties.set('property', 'xxx'); @@ -67,14 +67,14 @@ property4=Value4 expect(properties._stringifyProperties()).to.eql(['property=xxx']); }); - it( 'test Able to stringify properties after set with sections', () => { + it( 'Able to stringify properties after set with sections', () => { givenTheProperties('[main]\nproperty=Value'); properties.set('main.property', 'xxx'); expect(properties._stringifyProperties()).to.eql(['[main]', 'property=xxx']); }); - it( 'test Able to stringify properties after set with sections and dots', () => { + it( 'Able to stringify properties after set with sections and dots', () => { givenTheProperties('[main]\nproperty.one=Value'); properties.set('main.property.one', 'xxx');