Skip to content

Commit 209c2bd

Browse files
authored
Update custom-transform.spec.ts
C'mon linter - only quotes.
1 parent 0fc9cd9 commit 209c2bd

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/functional/custom-transform.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -160,22 +160,22 @@ describe("custom transformation decorator", () => {
160160
});
161161

162162
let model: any;
163-
it ('should serialize json into model instance of class Person', () => {
163+
it ("should serialize json into model instance of class Person", () => {
164164
expect(() => {
165165
const json = {
166-
name: 'John Doe',
166+
name: "John Doe",
167167
address: {
168-
street: 'Main Street 25',
169-
tel: '5454-534-645',
168+
street: "Main Street 25",
169+
tel: "5454-534-645",
170170
zip: 10353,
171-
country: 'West Samoa'
171+
country: "West Samoa"
172172
},
173173
age: 25,
174174
hobbies: [
175-
{ type: 'sport', name: 'sailing' },
176-
{ type: 'relax', name: 'reading' },
177-
{ type: 'sport', name: 'jogging' },
178-
{ type: 'relax', name: 'movies' }
175+
{ type: "sport", name: "sailing" },
176+
{ type: "relax", name: "reading" },
177+
{ type: "sport", name: "jogging" },
178+
{ type: "relax", name: "movies" }
179179
]
180180
};
181181
class Hobby {
@@ -185,7 +185,7 @@ describe("custom transformation decorator", () => {
185185
class Address {
186186
public street: string;
187187

188-
@Expose({ name: 'tel' })
188+
@Expose({ name: "tel" })
189189
public telephone: string;
190190

191191
public zip: number;
@@ -199,19 +199,19 @@ describe("custom transformation decorator", () => {
199199
public address: Address;
200200

201201
@Type(() => Hobby)
202-
@Transform(value => value.filter((hobby: any) => hobby.type === 'sport'), { toClassOnly: true })
202+
@Transform(value => value.filter((hobby: any) => hobby.type === "sport"), { toClassOnly: true })
203203
public hobbies: Hobby[];
204204

205205
public age: number;
206206
}
207207
model = plainToClass(Person, json);
208208
expect(model instanceof Person);
209209
expect(model.address instanceof Address);
210-
model.hobbies.forEach((hobby: Hobby) => expect(hobby instanceof Hobby && hobby.type === 'sport'));
210+
model.hobbies.forEach((hobby: Hobby) => expect(hobby instanceof Hobby && hobby.type === "sport"));
211211
}).to.not.throw();
212212
});
213213

214-
it ('should serialize a model into json', () => {
214+
it ("should serialize a model into json", () => {
215215
expect(() => {
216216
classToPlain(model);
217217
}).to.not.throw();

0 commit comments

Comments
 (0)