Skip to content

Commit 494d648

Browse files
committed
format and lint project
1 parent 90da7c9 commit 494d648

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

Earthfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ test-setup:
2626

2727
test:
2828
FROM +test-setup
29-
COPY docker-compose.yml ./
29+
COPY docker-compose.yml ./
3030
COPY +build/dist ./dist
3131
WITH DOCKER --compose docker-compose.yml
32-
RUN while ! docker exec local_pgdb pg_isready; do sleep 1; done ;\
32+
RUN while ! docker exec local_pgdb pg_isready; do sleep 1; done ;\
3333
docker cp ./scripts/db/bookstore-schecma.sql local_pgdb:./bookstore-schecma.sql &&\
3434
docker exec local_pgdb psql -U postgres -d bookstore_db -a -f bookstore-schecma.sql &&\
35-
pnpm test:ci
35+
pnpm test:ci
3636
END
3737

3838

3939
all:
4040
BUILD +build
4141
BUILD +lint
42-
BUILD +test
42+
BUILD +test

integration/integration.spec.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ describe("postgres tests", () => {
3131
await exec(
3232
`pnpm start pull --output ./${output} --connectionString ${connectionString}/bookstore_db --schemas bookstore`,
3333
);
34-
const entitiesDir = `./${output}/entities`
35-
const enumsDir = `./${output}/enums`
34+
const entitiesDir = `./${output}/entities`;
35+
const enumsDir = `./${output}/enums`;
3636

3737
const entitiesLs = await exec(`ls ${entitiesDir}`);
3838
expect(lsOutputToArray(entitiesLs.stdout)).toStrictEqual([
@@ -50,11 +50,9 @@ describe("postgres tests", () => {
5050
"index.ts",
5151
]);
5252

53-
54-
const bookGenreFile = await exec(
55-
`cat ${enumsDir}/BookGenre.ts`,
56-
);
57-
expect(bookGenreFile.stdout).toStrictEqual(`import { ValueListFieldType } from 'remult'
53+
const bookGenreFile = await exec(`cat ${enumsDir}/BookGenre.ts`);
54+
expect(bookGenreFile.stdout)
55+
.toStrictEqual(`import { ValueListFieldType } from 'remult'
5856
5957
@ValueListFieldType()
6058
export class BookGenre {
@@ -69,11 +67,9 @@ export class BookGenre {
6967
7068
constructor(public id: string, public caption: string) {}
7169
}
72-
`)
70+
`);
7371

74-
const authorFile = await exec(
75-
`cat ${entitiesDir}/Bookstore_Author.ts`,
76-
);
72+
const authorFile = await exec(`cat ${entitiesDir}/Bookstore_Author.ts`);
7773
expect(authorFile.stdout).toStrictEqual(
7874
`import { Entity, Fields } from 'remult'
7975
import { Relations } from 'remult'
@@ -187,9 +183,7 @@ export class Bookstore_Customer {
187183
}
188184
`);
189185

190-
const orderFile = await exec(
191-
`cat ${entitiesDir}/Bookstore_Order.ts`,
192-
);
186+
const orderFile = await exec(`cat ${entitiesDir}/Bookstore_Order.ts`);
193187
expect(orderFile.stdout)
194188
.toStrictEqual(`import { Entity, Field, Fields } from 'remult'
195189
import { Relations } from 'remult'

src/utils/genId.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const genId = (prefix = "") => {
2-
let count = 0
3-
return () => {
4-
count++
5-
return `${prefix}${count}`
6-
}
7-
}
2+
let count = 0;
3+
return () => {
4+
count++;
5+
return `${prefix}${count}`;
6+
};
7+
};

0 commit comments

Comments
 (0)