Skip to content

Commit 984f960

Browse files
meatball133SleeplessByte
authored andcommitted
Runned prettier again
1 parent 4a821b3 commit 984f960

File tree

4 files changed

+86
-86
lines changed

4 files changed

+86
-86
lines changed

exercises/concept/train-driver/.docs/instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ The variable `moreRouteInformation` can contain different properties.
7070
```
7171

7272
```javascript
73-
route = { from: "Berlin", to: "Hamburg" };
74-
moreRouteInformation = { length: "100", speed: "50" };
73+
route = { from: 'Berlin', to: 'Hamburg' };
74+
moreRouteInformation = { length: '100', speed: '50' };
7575
extendRouteInformation(route, moreRouteInformation);
7676
// => {from: "Berlin", to: "Hamburg", length: "100", speed: "50"}
7777
```
@@ -86,10 +86,10 @@ The function should return an array there the first element of the array is the
8686

8787
```javascript
8888
routeInformation = {
89-
from: "Berlin",
90-
to: "Hamburg",
91-
length: "100",
92-
timeOfArrival: "10:10",
89+
from: 'Berlin',
90+
to: 'Hamburg',
91+
length: '100',
92+
timeOfArrival: '10:10',
9393
};
9494
separateTimeOfArrival(routeInformation);
9595
// => ["10:10", {from: "Berlin", to: "Hamburg", length: "100"}]

exercises/concept/train-driver/.docs/introduction.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Similarly to arrays, the rest operator can also be used to collect one or more o
3030

3131
```javascript
3232
const { street, ...address } = {
33-
street: "Platz der Republik 1",
34-
postalCode: "11011",
35-
city: "Berlin",
33+
street: 'Platz der Republik 1',
34+
postalCode: '11011',
35+
city: 'Berlin',
3636
};
3737
street;
3838
// => 'Platz der Republik 1'
@@ -46,11 +46,11 @@ When `...` appears in a function definition next to its last argument, that para
4646

4747
```javascript
4848
function concat(...strings) {
49-
return strings.join(" ");
49+
return strings.join(' ');
5050
}
51-
concat("one");
51+
concat('one');
5252
// => 'one'
53-
concat("one", "two", "three");
53+
concat('one', 'two', 'three');
5454
// => 'one two three'
5555
```
5656

@@ -65,7 +65,7 @@ const oneToFive = [1, 2, 3, 4, 5];
6565
const oneToTen = [...oneToFive, 6, 7, 8, 9, 10];
6666
oneToTen;
6767
// => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
68-
const woow = ["A", ...oneToFive, "B", "C", "D", "E", ...oneToFive, 42];
68+
const woow = ['A', ...oneToFive, 'B', 'C', 'D', 'E', ...oneToFive, 42];
6969
woow;
7070
// => ["A", 1, 2, 3, 4, 5, "B", "C", "D", "E", 1, 2, 3, 4, 5, 42]
7171
```
@@ -76,10 +76,10 @@ Similarly to arrays, the spread operator can also be used to copy properties fro
7676

7777
```javascript
7878
let address = {
79-
postalCode: "11011",
80-
city: "Berlin",
79+
postalCode: '11011',
80+
city: 'Berlin',
8181
};
82-
address = { ...address, country: "Germany" };
82+
address = { ...address, country: 'Germany' };
8383
// => {
8484
// postalCode: '11011',
8585
// city: 'Berlin',

exercises/concept/train-driver/train-driver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ export function extendRouteInformation(route, moreRouteInformation) {
5454
*/
5555
export function separateTimeOfArrival(route) {
5656
throw new Error('Please implement the separateTimeOfArrival function');
57-
}
57+
}

exercises/concept/train-driver/train-driver.spec.js

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,48 @@ import {
44
correctListOfWagons,
55
extendRouteInformation,
66
separateTimeOfArrival,
7-
} from "./train-driver";
7+
} from './train-driver';
88

9-
describe("getListOfWagons", () => {
10-
test("return the correct array", () => {
9+
describe('getListOfWagons', () => {
10+
test('return the correct array', () => {
1111
expect(getListOfWagons(1, 5, 2, 7, 4)).toEqual([1, 5, 2, 7, 4]);
1212
});
1313

14-
test("works for a few arrgument", () => {
14+
test('works for a few arrgument', () => {
1515
expect(getListOfWagons(1, 5)).toEqual([1, 5]);
1616
});
1717

18-
test("works for a one arrgument", () => {
18+
test('works for a one arrgument', () => {
1919
expect(getListOfWagons(1)).toEqual([1]);
2020
});
2121

22-
test("works for many argument", () => {
22+
test('works for many argument', () => {
2323
expect(getListOfWagons(1, 5, 6, 3, 9, 8, 4, 14, 24, 7)).toEqual([
2424
1, 5, 6, 3, 9, 8, 4, 14, 24, 7,
2525
]);
2626
});
2727
});
2828

29-
describe("fixListOfWagons", () => {
30-
test("reorder the first 2 wagons to the end of the array", () => {
29+
describe('fixListOfWagons', () => {
30+
test('reorder the first 2 wagons to the end of the array', () => {
3131
const eachWagonsID = [3, 7, 1, 14, 10, 4, 12, 6, 23, 17, 13, 20, 8, 19];
3232
const expected = [1, 14, 10, 4, 12, 6, 23, 17, 13, 20, 8, 19, 3, 7];
3333
expect(fixListOfWagons(eachWagonsID)).toEqual(expected);
3434
});
3535

36-
test("works when only 3 wagons given", () => {
36+
test('works when only 3 wagons given', () => {
3737
const eachWagonsID = [4, 2, 1];
3838
expect(fixListOfWagons(eachWagonsID)).toEqual([1, 4, 2]);
3939
});
4040

41-
test("works for a few wagons", () => {
41+
test('works for a few wagons', () => {
4242
const eachWagonsID = [3, 4, 1, 5, 7, 9, 10];
4343
expect(fixListOfWagons(eachWagonsID)).toEqual([1, 5, 7, 9, 10, 3, 4]);
4444
});
4545
});
4646

47-
describe("correctListOfWagons", () => {
48-
test("returns a wagon wieght list with the inserted array of values", () => {
47+
describe('correctListOfWagons', () => {
48+
test('returns a wagon wieght list with the inserted array of values', () => {
4949
const eachWagonsID = [1, 6, 11, 15, 13, 14, 17, 22, 2, 16, 19, 21];
5050
const missingWagons = [8, 10, 5, 9, 3, 7, 20];
5151
const expected = [
@@ -54,120 +54,120 @@ describe("correctListOfWagons", () => {
5454
expect(correctListOfWagons(eachWagonsID, missingWagons)).toEqual(expected);
5555
});
5656

57-
test("works for short arrays", () => {
57+
test('works for short arrays', () => {
5858
const eachWagonsID = [1, 7, 15, 24];
5959
const missingWagons = [8, 6, 4];
6060
const expected = [1, 8, 6, 4, 7, 15, 24];
6161
expect(correctListOfWagons(eachWagonsID, missingWagons)).toEqual(expected);
6262
});
6363

64-
test("works when missingWagons is longer", () => {
64+
test('works when missingWagons is longer', () => {
6565
const eachWagonsID = [1, 7, 15, 24];
6666
const missingWagons = [8, 6, 4, 5, 9, 21, 2, 13];
6767
const expected = [1, 8, 6, 4, 5, 9, 21, 2, 13, 7, 15, 24];
6868
expect(correctListOfWagons(eachWagonsID, missingWagons)).toEqual(expected);
6969
});
7070
});
7171

72-
describe("extendRouteInformation", () => {
73-
test("correctly extend route information", () => {
74-
const route = { from: "Berlin", to: "Hamburg" };
72+
describe('extendRouteInformation', () => {
73+
test('correctly extend route information', () => {
74+
const route = { from: 'Berlin', to: 'Hamburg' };
7575
const moreRouteInformation = {
76-
timeOfArrival: "12:00",
77-
precipitation: "10",
78-
temperature: "5",
76+
timeOfArrival: '12:00',
77+
precipitation: '10',
78+
temperature: '5',
7979
};
8080
const expected = {
81-
from: "Berlin",
82-
to: "Hamburg",
83-
timeOfArrival: "12:00",
84-
precipitation: "10",
85-
temperature: "5",
81+
from: 'Berlin',
82+
to: 'Hamburg',
83+
timeOfArrival: '12:00',
84+
precipitation: '10',
85+
temperature: '5',
8686
};
8787
expect(extendRouteInformation(route, moreRouteInformation)).toEqual(
8888
expected
8989
);
9090
});
9191

92-
test("works when not adding precipitation", () => {
93-
const route = { from: "Paris", to: "London" };
94-
const moreRouteInformation = { timeOfArrival: "10:30", temperature: "20" };
92+
test('works when not adding precipitation', () => {
93+
const route = { from: 'Paris', to: 'London' };
94+
const moreRouteInformation = { timeOfArrival: '10:30', temperature: '20' };
9595
const expected = {
96-
from: "Paris",
97-
to: "London",
98-
timeOfArrival: "10:30",
99-
temperature: "20",
96+
from: 'Paris',
97+
to: 'London',
98+
timeOfArrival: '10:30',
99+
temperature: '20',
100100
};
101101
expect(extendRouteInformation(route, moreRouteInformation)).toEqual(
102102
expected
103103
);
104104
});
105105

106-
test("works when written in diffrent order", () => {
107-
const route = { from: "Gothenburg", to: "Copenhagen" };
106+
test('works when written in diffrent order', () => {
107+
const route = { from: 'Gothenburg', to: 'Copenhagen' };
108108
const moreRouteInformation = {
109-
precipitation: "1",
110-
timeOfArrival: "21:20",
111-
temperature: "-6",
109+
precipitation: '1',
110+
timeOfArrival: '21:20',
111+
temperature: '-6',
112112
};
113113
const expected = {
114-
from: "Gothenburg",
115-
to: "Copenhagen",
116-
precipitation: "1",
117-
timeOfArrival: "21:20",
118-
temperature: "-6",
114+
from: 'Gothenburg',
115+
to: 'Copenhagen',
116+
precipitation: '1',
117+
timeOfArrival: '21:20',
118+
temperature: '-6',
119119
};
120120
expect(extendRouteInformation(route, moreRouteInformation)).toEqual(
121121
expected
122122
);
123123
});
124124
});
125125

126-
describe("separateTimeOfArrival", () => {
127-
test("seperate timeOfArrival from object", () => {
126+
describe('separateTimeOfArrival', () => {
127+
test('seperate timeOfArrival from object', () => {
128128
const route = {
129-
from: "Berlin",
130-
to: "Hamburg",
131-
timeOfArrival: "12:00",
132-
precipitation: "10",
133-
temperature: "5",
129+
from: 'Berlin',
130+
to: 'Hamburg',
131+
timeOfArrival: '12:00',
132+
precipitation: '10',
133+
temperature: '5',
134134
};
135135
const expected = [
136-
"12:00",
137-
{ from: "Berlin", to: "Hamburg", precipitation: "10", temperature: "5" },
136+
'12:00',
137+
{ from: 'Berlin', to: 'Hamburg', precipitation: '10', temperature: '5' },
138138
];
139139
expect(separateTimeOfArrival(route)).toEqual(expected);
140140
});
141141

142-
test("seperate timeOfArrival with shorter object", () => {
142+
test('seperate timeOfArrival with shorter object', () => {
143143
const route = {
144-
from: "Paris",
145-
to: "London",
146-
timeOfArrival: "10:30",
147-
temperature: "20",
144+
from: 'Paris',
145+
to: 'London',
146+
timeOfArrival: '10:30',
147+
temperature: '20',
148148
};
149149
const expected = [
150-
"10:30",
151-
{ from: "Paris", to: "London", temperature: "20" },
150+
'10:30',
151+
{ from: 'Paris', to: 'London', temperature: '20' },
152152
];
153153
expect(separateTimeOfArrival(route)).toEqual(expected);
154154
});
155155

156-
test("seperate timeOfArrival from object", () => {
156+
test('seperate timeOfArrival from object', () => {
157157
const route = {
158-
from: "Gothenburg",
159-
to: "Copenhagen",
160-
precipitation: "1",
161-
timeOfArrival: "21:20",
162-
temperature: "-6",
158+
from: 'Gothenburg',
159+
to: 'Copenhagen',
160+
precipitation: '1',
161+
timeOfArrival: '21:20',
162+
temperature: '-6',
163163
};
164164
const expected = [
165-
"21:20",
165+
'21:20',
166166
{
167-
from: "Gothenburg",
168-
to: "Copenhagen",
169-
precipitation: "1",
170-
temperature: "-6",
167+
from: 'Gothenburg',
168+
to: 'Copenhagen',
169+
precipitation: '1',
170+
temperature: '-6',
171171
},
172172
];
173173
expect(separateTimeOfArrival(route)).toEqual(expected);

0 commit comments

Comments
 (0)