Skip to content

Commit 13e68f5

Browse files
committed
fix: properly configure prettier to minimize diff
1 parent cee94fd commit 13e68f5

28 files changed

+2282
-2246
lines changed

.coveralls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
service_name: travis-ci
2-
repo_token: vuiBI2GvUrtb2lU2yChUBCOPggEAxIdRs
2+
repo_token: vuiBI2GvUrtb2lU2yChUBCOPggEAxIdRs

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

__tests__/authentication-request.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
var AuthenticationRequest = require("../src/authentication-request");
1+
var AuthenticationRequest = require('../src/authentication-request');
22

3-
describe("Create Authentication Requests", () => {
4-
test("Should use default settings if none are supplied", () => {
3+
describe('Create Authentication Requests', () => {
4+
test('Should use default settings if none are supplied', () => {
55
var request = AuthenticationRequest.builder().build();
66

7-
expect(request.getHost()).toBe("accounts.spotify.com");
7+
expect(request.getHost()).toBe('accounts.spotify.com');
88
expect(request.getPort()).toBe(443);
9-
expect(request.getScheme()).toBe("https");
9+
expect(request.getScheme()).toBe('https');
1010
expect(request.getHeaders()).toBeFalsy();
1111
expect(request.getPath()).toBeFalsy();
1212
expect(request.getQueryParameters()).toBeFalsy();
1313
expect(request.getBodyParameters()).toBeFalsy();
1414
});
1515

16-
test("Can overwrite one of the default parameters", () => {
16+
test('Can overwrite one of the default parameters', () => {
1717
var request = AuthenticationRequest.builder()
18-
.withHost("such.host.wow")
18+
.withHost('such.host.wow')
1919
.build();
2020

21-
expect(request.getHost()).toBe("such.host.wow");
21+
expect(request.getHost()).toBe('such.host.wow');
2222
expect(request.getPort()).toBe(443);
23-
expect(request.getScheme()).toBe("https");
23+
expect(request.getScheme()).toBe('https');
2424
expect(request.getHeaders()).toBeFalsy();
2525
expect(request.getPath()).toBeFalsy();
2626
expect(request.getQueryParameters()).toBeFalsy();

__tests__/base-request.js

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,180 +1,180 @@
1-
var Request = require("../src/base-request");
1+
var Request = require('../src/base-request');
22

3-
describe("Create Requests", () => {
4-
test("Should create host, port, and scheme", () => {
3+
describe('Create Requests', () => {
4+
test('Should create host, port, and scheme', () => {
55
var request = Request.builder()
6-
.withHost("such.api.wow")
6+
.withHost('such.api.wow')
77
.withPort(1337)
8-
.withScheme("http")
8+
.withScheme('http')
99
.build();
1010

11-
expect(request.getHost()).toBe("such.api.wow");
11+
expect(request.getHost()).toBe('such.api.wow');
1212
expect(request.getPort()).toBe(1337);
13-
expect(request.getScheme()).toBe("http");
13+
expect(request.getScheme()).toBe('http');
1414
});
1515

16-
test("Should add query parameters", () => {
16+
test('Should add query parameters', () => {
1717
var request = Request.builder()
18-
.withHost("such.api.wow")
18+
.withHost('such.api.wow')
1919
.withPort(1337)
20-
.withScheme("http")
20+
.withScheme('http')
2121
.withQueryParameters({
2222
oneParameter: 1,
2323
anotherParameter: true,
24-
thirdParameter: "hello",
24+
thirdParameter: 'hello'
2525
})
2626
.build();
2727

2828
expect(request.getQueryParameters().oneParameter).toBe(1);
2929
expect(request.getQueryParameters().anotherParameter).toBe(true);
30-
expect(request.getQueryParameters().thirdParameter).toBe("hello");
30+
expect(request.getQueryParameters().thirdParameter).toBe('hello');
3131
});
3232

33-
test("Should add query parameters (multiple calls)", () => {
33+
test('Should add query parameters (multiple calls)', () => {
3434
var request = Request.builder()
35-
.withHost("such.api.wow")
35+
.withHost('such.api.wow')
3636
.withPort(1337)
37-
.withScheme("http")
37+
.withScheme('http')
3838
.withQueryParameters({
3939
oneParameter: 1,
40-
anotherParameter: true,
40+
anotherParameter: true
4141
})
4242
.withQueryParameters({
43-
thirdParameter: "hello",
43+
thirdParameter: 'hello'
4444
})
4545
.build();
4646

4747
expect(request.getQueryParameters().oneParameter).toBe(1);
4848
expect(request.getQueryParameters().anotherParameter).toBe(true);
49-
expect(request.getQueryParameters().thirdParameter).toBe("hello");
49+
expect(request.getQueryParameters().thirdParameter).toBe('hello');
5050
});
5151

52-
test("Should add query parameters (combine calls)", () => {
52+
test('Should add query parameters (combine calls)', () => {
5353
var request = Request.builder()
54-
.withHost("such.api.wow")
54+
.withHost('such.api.wow')
5555
.withPort(1337)
56-
.withScheme("http")
56+
.withScheme('http')
5757
.withQueryParameters(
5858
{
5959
oneParameter: 1,
60-
anotherParameter: true,
60+
anotherParameter: true
6161
},
6262
{
63-
thirdParameter: "hello",
63+
thirdParameter: 'hello'
6464
}
6565
)
6666
.build();
6767

6868
expect(request.getQueryParameters().oneParameter).toBe(1);
6969
expect(request.getQueryParameters().anotherParameter).toBe(true);
70-
expect(request.getQueryParameters().thirdParameter).toBe("hello");
70+
expect(request.getQueryParameters().thirdParameter).toBe('hello');
7171
});
7272

73-
test("Should add body parameters", () => {
73+
test('Should add body parameters', () => {
7474
var request = Request.builder()
75-
.withHost("such.api.wow")
75+
.withHost('such.api.wow')
7676
.withPort(1337)
77-
.withScheme("http")
77+
.withScheme('http')
7878
.withBodyParameters({
7979
one: 1,
8080
two: true,
81-
three: "world",
81+
three: 'world'
8282
})
8383
.build();
8484

8585
expect(request.getBodyParameters().one).toBe(1);
8686
expect(request.getBodyParameters().two).toBe(true);
87-
expect(request.getBodyParameters().three).toBe("world");
87+
expect(request.getBodyParameters().three).toBe('world');
8888
});
8989

90-
test("Should add array to body parameters", () => {
90+
test('Should add array to body parameters', () => {
9191
var request = Request.builder()
92-
.withHost("such.api.wow")
92+
.withHost('such.api.wow')
9393
.withPort(1337)
94-
.withScheme("http")
95-
.withBodyParameters(["3VNWq8rTnQG6fM1eldSpZ0"])
94+
.withScheme('http')
95+
.withBodyParameters(['3VNWq8rTnQG6fM1eldSpZ0'])
9696
.build();
9797

98-
expect(request.getBodyParameters()).toEqual(["3VNWq8rTnQG6fM1eldSpZ0"]);
98+
expect(request.getBodyParameters()).toEqual(['3VNWq8rTnQG6fM1eldSpZ0']);
9999
});
100100

101-
test("Should add header parameters", () => {
101+
test('Should add header parameters', () => {
102102
var request = Request.builder()
103-
.withHost("such.api.wow")
103+
.withHost('such.api.wow')
104104
.withPort(1337)
105-
.withScheme("http")
105+
.withScheme('http')
106106
.withHeaders({
107-
Authorization: "Basic WOOP",
108-
"Content-Type": "application/lol",
107+
Authorization: 'Basic WOOP',
108+
'Content-Type': 'application/lol'
109109
})
110110
.build();
111111

112-
expect(request.getHeaders().Authorization).toBe("Basic WOOP");
113-
expect(request.getHeaders()["Content-Type"]).toBe("application/lol");
112+
expect(request.getHeaders().Authorization).toBe('Basic WOOP');
113+
expect(request.getHeaders()['Content-Type']).toBe('application/lol');
114114
});
115115

116-
test("Should add path", () => {
116+
test('Should add path', () => {
117117
var request = Request.builder()
118-
.withHost("such.api.wow")
118+
.withHost('such.api.wow')
119119
.withPort(1337)
120-
.withPath("/v1/users/meriosweg")
120+
.withPath('/v1/users/meriosweg')
121121
.build();
122122

123-
expect(request.getPath()).toBe("/v1/users/meriosweg");
123+
expect(request.getPath()).toBe('/v1/users/meriosweg');
124124
});
125125

126-
test("Should build URI", () => {
126+
test('Should build URI', () => {
127127
var request = Request.builder()
128-
.withHost("such.api.wow")
129-
.withScheme("https")
128+
.withHost('such.api.wow')
129+
.withScheme('https')
130130
.withPort(1337)
131-
.withPath("/v1/users/meriosweg")
131+
.withPath('/v1/users/meriosweg')
132132
.build();
133133

134134
expect(request.getURI()).toBe(
135-
"https://such.api.wow:1337/v1/users/meriosweg"
135+
'https://such.api.wow:1337/v1/users/meriosweg'
136136
);
137137
});
138138

139-
test("Should construct empty query paramaters string", () => {
139+
test('Should construct empty query paramaters string', () => {
140140
var request = Request.builder().withQueryParameters({}).build();
141141

142142
expect(request.getQueryParameterString()).toBeFalsy();
143143
});
144144

145-
test("Should construct query paramaters string for one parameter", () => {
145+
test('Should construct query paramaters string for one parameter', () => {
146146
var request = Request.builder()
147147
.withQueryParameters({
148-
one: 1,
148+
one: 1
149149
})
150150
.build();
151151

152-
expect(request.getQueryParameterString()).toBe("?one=1");
152+
expect(request.getQueryParameterString()).toBe('?one=1');
153153
});
154154

155-
test("Should construct query paramaters string for multiple parameters", () => {
155+
test('Should construct query paramaters string for multiple parameters', () => {
156156
var request = Request.builder()
157157
.withQueryParameters({
158158
one: 1,
159159
two: true,
160-
three: "world",
160+
three: 'world'
161161
})
162162
.build();
163163

164164
expect(request.getQueryParameterString()).toBe(
165-
"?one=1&two=true&three=world"
165+
'?one=1&two=true&three=world'
166166
);
167167
});
168168

169-
test("Should construct query paramaters string and exclude undefined values", () => {
169+
test('Should construct query paramaters string and exclude undefined values', () => {
170170
var request = Request.builder()
171171
.withQueryParameters({
172172
one: 1,
173173
two: undefined,
174-
three: "world",
174+
three: 'world'
175175
})
176176
.build();
177177

178-
expect(request.getQueryParameterString()).toBe("?one=1&three=world");
178+
expect(request.getQueryParameterString()).toBe('?one=1&three=world');
179179
});
180180
});

0 commit comments

Comments
 (0)