Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
fix: type-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Mar 4, 2022
1 parent c9de1f0 commit bb60d60
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
3 changes: 2 additions & 1 deletion cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"isolatedModules": false,
"types": ["cypress"]
},
"include": ["../node_modules/cypress", "./**/*.ts"]
"include": ["../node_modules/cypress", "./**/*.ts"],
"exclude": ["node_modules"]
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"storybook:start": "start-storybook -p 6006",
"storybook:build": "build-storybook -c .storybook -o .out",
"storybook:deploy": "npm run storybook:build && gh-pages -d .out",
"storybook:deploy:action": "npm run storybook:build && gh-pages -d .out -u \"github-actions-bot <support+actions@github.com>\""
"storybook:deploy:action": "npm run storybook:build && gh-pages -d .out -u \"github-actions-bot <support+actions@github.com>\"",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"dependencies": {
"@dataesr/react-dsfr": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://template.fabrique.social.gouv.fr</loc><changefreq>daily</changefreq><priority>0.7</priority><lastmod>2022-03-04T11:34:05.964Z</lastmod></url>
<url><loc>https://template.fabrique.social.gouv.fr</loc><changefreq>daily</changefreq><priority>0.7</priority><lastmod>2022-03-04T15:45:11.208Z</lastmod></url>
</urlset>
13 changes: 9 additions & 4 deletions src/components/footer/__tests__/bottom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ import { render, screen } from "@testing-library/react";
import { Bottom } from "../bottom";

describe("Bottom", () => {
it("renders copyright", async () => {
const copyright = "© République Française 2022";
it("renders version", async () => {
const version = "1.0.0";
render(
<Bottom copyright={copyright} links={[{ href: "/", title: "Yo" }]} />
<Bottom
version={version}
commitHash="master"
repositoryUrl="https://github.com/SocialGouv/template"
links={[{ href: "/", title: "Yo" }]}
/>
);
expect(screen.getByText(copyright)).toBeDefined();
expect(screen.getByText(version)).toBeDefined();
});
});
5 changes: 2 additions & 3 deletions src/components/layout/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { ComponentStory, ComponentMeta } from "@storybook/react";

import Layout from "./";
import {
headerBody,
headerNav,
footerBodySection,
footerBottomSection,
footerPartnerSection,
footerTopSection,
headerProps,
} from "@config";

export default {
Expand All @@ -21,7 +20,7 @@ const Template: ComponentStory<typeof Layout> = args => <Layout {...args} />;
export const Default = Template.bind({});
Default.args = {
children: <p>Hello World</p>,
headerProps: { bodySection: headerBody, navSection: headerNav },
headerProps: headerProps,
footerProps: {
bodySection: footerBodySection,
bottomSection: footerBottomSection,
Expand Down
10 changes: 9 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,13 @@
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "next-sitemap.js"]
"exclude": [
"node_modules",
"next-sitemap.js",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.test.ts",
"**/*.test.tsx",
"cypress/**/*"
]
}

0 comments on commit bb60d60

Please sign in to comment.