Skip to content

Commit 57727e6

Browse files
authored
Merge branch 'master' into feature/recursive-generics
2 parents 736a1c4 + 4350ef9 commit 57727e6

17 files changed

+286
-240
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Ts Auto Mock
1+
# TS auto mock
22
![Test](https://github.com/Typescript-TDD/ts-auto-mock/workflows/Test/badge.svg)
33
[![npm version](https://badge.fury.io/js/ts-auto-mock.svg)](https://badge.fury.io/js/ts-auto-mock)
4-
[![Downloads](https://img.shields.io/npm/dw/ts-auto-mock.svg)](https://www.npmjs.com/package/ts-auto-mock)
4+
[![Downloads](https://img.shields.io/npm/dw/ts-auto-mock.svg)](https://www.npmjs.com/package/ts-auto-mock)
55
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
66
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
77

8-
![slack](docs/slack_small.png) Need help? Join us on [Slack](https://join.slack.com/t/typescripttdd/shared_invite/enQtODk3MjQwNzUwNTk2LTMzNjdlZTNmMmY3Nzg2NDNiZDA1YzJmZjk2NjcwZjQwODQ3YzE5NGZjM2Q4MzZjYWNiMWE4MGU0NjEzM2E5YzE)
8+
![Slack](docs/slack_small.png) Need help? Join us on [Slack](https://join.slack.com/t/typescripttdd/shared_invite/enQtODk3MjQwNzUwNTk2LTMzNjdlZTNmMmY3Nzg2NDNiZDA1YzJmZjk2NjcwZjQwODQ3YzE5NGZjM2Q4MzZjYWNiMWE4MGU0NjEzM2E5YzE)
99

10-
A Typescript transformer that will allow you to create mock for any types (Interfaces, Classes, ...) without need to create manual fakes/mocks.
10+
A TypeScript transformer that will allow you to create mocks for any types (interfaces, classes, etc.) without the need to create manual fakes/mocks.
1111

12-
## [Api Documentation](https://typescript-tdd.github.io/ts-auto-mock)
12+
## [API Documentation](https://typescript-tdd.github.io/ts-auto-mock)
1313

1414
#### [Installation](https://typescript-tdd.github.io/ts-auto-mock/installation)
1515
#### [Usage](https://typescript-tdd.github.io/ts-auto-mock/create-mock)
@@ -28,15 +28,19 @@ interface Person {
2828
const mock = createMock<Person>();
2929
mock.id // ""
3030
mock.getName() // ""
31-
mock.details // "{phone: 0} "
31+
mock.details // "{ phone: 0 }"
3232
```
3333

3434
* If you are interested to use it with jasmine please go to [jasmine-ts-auto-mock](https://github.com/Typescript-TDD/jasmine-ts-auto-mock)
3535
* If you are interested to use it with jest please go to [jest-ts-auto-mock](https://github.com/Typescript-TDD/jest-ts-auto-mock)
36-
37-
## [Changelog](CHANGELOG.md)
3836

39-
## [Roadmap](https://github.com/Typescript-TDD/ts-auto-mock/wiki/Roadmap)
37+
## Changelog
38+
39+
Find the changelog here: [Changelog](CHANGELOG.md).
40+
41+
## Roadmap
42+
43+
You can find the roadmap of this project on the Wiki page: [Roadmap](https://github.com/Typescript-TDD/ts-auto-mock/wiki/Roadmap).
4044

4145
## Do you want to contribute?
4246
* [Check how to make changes to the code base](https://typescript-tdd.github.io/ts-auto-mock/local-development)

data/definitelyTyped/a4b17491-a90a-4eb8-97e7-f58c8ddbc538.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/definitelyTyped/list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"id":"756c5f8d-be26-43fc-8831-0a12df4c972e.json","initialDate":"2020-01-11T17:17:58.333Z","lastUpdatedDate":"2020-01-16T00:31:39.270Z","typesProcessed":9999},{"id":"9749238a-cba9-4abd-9fac-f9d0d4ef90e3.json","initialDate":"2020-01-17T20:34:24.904Z","lastUpdatedDate":"2020-02-01T00:40:31.064Z","typesProcessed":9999},{"id":"45e2213b-fa9c-40d1-b066-89413f063ee3.json","initialDate":"2020-02-01T17:11:06.944Z","lastUpdatedDate":"2020-03-07T00:20:59.201Z","typesProcessed":6549},{"id":"532444dd-7414-42ad-8d30-3da2d2e6c9af.json","initialDate":"2020-03-08T08:08:21.638Z","lastUpdatedDate":"2020-03-17T00:55:23.522Z","typesProcessed":9999},{"id":"59fcd50b-ad93-43d9-8777-45cf4cb83abe.json","initialDate":"2020-03-29T00:47:04.041Z","lastUpdatedDate":"2020-05-10T00:20:06.743Z","typesProcessed":6744},{"id":"6dafe6a4-fd96-4cee-a280-2ef999b957ac.json","initialDate":"2020-05-11T00:52:07.109Z","lastUpdatedDate":"2020-06-17T00:33:39.118Z","typesProcessed":6850},{"id":"a4b17491-a90a-4eb8-97e7-f58c8ddbc538.json","initialDate":"2020-06-18T00:57:32.208Z","lastUpdatedDate":"2020-06-20T00:57:16.555Z","typesProcessed":1500}]
1+
[{"id":"756c5f8d-be26-43fc-8831-0a12df4c972e.json","initialDate":"2020-01-11T17:17:58.333Z","lastUpdatedDate":"2020-01-16T00:31:39.270Z","typesProcessed":9999},{"id":"9749238a-cba9-4abd-9fac-f9d0d4ef90e3.json","initialDate":"2020-01-17T20:34:24.904Z","lastUpdatedDate":"2020-02-01T00:40:31.064Z","typesProcessed":9999},{"id":"45e2213b-fa9c-40d1-b066-89413f063ee3.json","initialDate":"2020-02-01T17:11:06.944Z","lastUpdatedDate":"2020-03-07T00:20:59.201Z","typesProcessed":6549},{"id":"532444dd-7414-42ad-8d30-3da2d2e6c9af.json","initialDate":"2020-03-08T08:08:21.638Z","lastUpdatedDate":"2020-03-17T00:55:23.522Z","typesProcessed":9999},{"id":"59fcd50b-ad93-43d9-8777-45cf4cb83abe.json","initialDate":"2020-03-29T00:47:04.041Z","lastUpdatedDate":"2020-05-10T00:20:06.743Z","typesProcessed":6744},{"id":"6dafe6a4-fd96-4cee-a280-2ef999b957ac.json","initialDate":"2020-05-11T00:52:07.109Z","lastUpdatedDate":"2020-06-17T00:33:39.118Z","typesProcessed":6850},{"id":"a4b17491-a90a-4eb8-97e7-f58c8ddbc538.json","initialDate":"2020-06-18T00:57:32.208Z","lastUpdatedDate":"2020-06-26T00:57:26.736Z","typesProcessed":4500}]

data/performance.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ui/doczrc.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@ import pkg from './package.json';
22
const libName = pkg.name;
33

44
export default {
5-
typescript: true,
6-
themeConfig: {
7-
initialColorMode: 'dark',
8-
showDarkModeSwitch: false
9-
},
10-
base: `/${libName}/`,
11-
menu: [
12-
{ name: 'Home'},
13-
{ name: 'Installation'},
14-
{ name: 'Create mock', menu: ['Default']},
15-
{ name: 'Create mock list'},
16-
{ name: 'Register mock'},
17-
{ name: 'Extension'},
18-
{ name: 'Types supported'},
19-
{ name: 'Types not supported'},
20-
{ name: 'Config'},
21-
{ name: 'Performance'},
22-
{ name: 'Definitely Typed'},
23-
{ name: 'Local development'}
24-
],
25-
repository: "https://github.com/Typescript-TDD/ts-auto-mock"
26-
}
5+
typescript: true,
6+
themeConfig: {
7+
initialColorMode: 'dark',
8+
showDarkModeSwitch: false
9+
},
10+
title: 'TS auto mock',
11+
base: `/${libName}/`,
12+
menu: [
13+
{ name: 'Home'},
14+
{ name: 'Installation'},
15+
{ name: 'Create mock', menu: ['Default']},
16+
{ name: 'Create mock list'},
17+
{ name: 'Register mock'},
18+
{ name: 'Extension'},
19+
{ name: 'Types supported'},
20+
{ name: 'Types not supported'},
21+
{ name: 'Config'},
22+
{ name: 'Performance'},
23+
{ name: 'Definitely Typed'},
24+
{ name: 'Local development'}
25+
],
26+
repository: "https://github.com/Typescript-TDD/ts-auto-mock"
27+
};

ui/gatsby-config.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module.exports = {
2-
plugins: [
3-
`gatsby-plugin-sass`,
4-
`gatsby-plugin-offline`,
5-
{
6-
resolve: `gatsby-plugin-google-analytics`,
7-
options: {
8-
trackingId: "UA-37077972-4",
9-
head: false
10-
},
11-
}
12-
]
2+
plugins: [
3+
`gatsby-plugin-sass`,
4+
`gatsby-plugin-offline`,
5+
{
6+
resolve: `gatsby-plugin-google-analytics`,
7+
options: {
8+
trackingId: "UA-37077972-4",
9+
head: false
10+
},
11+
}
12+
]
1313
};

ui/gatsby-node.js

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,37 @@ const development = 'development';
55
const activeEnv = process.env.NODE_ENV || development;
66

77
exports.onCreateWebpackConfig = ({
8-
stage,
9-
rules,
10-
loaders,
11-
plugins,
12-
actions,
13-
}) => {
14-
15-
actions.setWebpackConfig({
16-
plugins: [
17-
new WebpackCopyPlugin([
18-
{
19-
from: path.resolve('..', '..', 'data'),
20-
to: 'resources'
21-
},
22-
{
23-
from: path.resolve('..', '_config.yml'),
24-
to: ''
25-
}
26-
]),
27-
new Dotenv({
28-
path: resolveEnvironmentVariables(activeEnv)
29-
})
30-
],
31-
});
8+
stage,
9+
rules,
10+
loaders,
11+
plugins,
12+
actions,
13+
}) => {
14+
actions.setWebpackConfig({
15+
plugins: [
16+
new WebpackCopyPlugin([
17+
{
18+
from: path.resolve('..', '..', 'data'),
19+
to: 'resources'
20+
},
21+
{
22+
from: path.resolve('..', '_config.yml'),
23+
to: ''
24+
}
25+
]),
26+
new Dotenv({
27+
path: resolveEnvironmentVariables(activeEnv)
28+
})
29+
],
30+
});
3231
};
3332

3433
function resolveEnvironmentVariables(env) {
35-
const isDevelopment = activeEnv === development;
34+
const isDevelopment = activeEnv === development;
3635

37-
if (isDevelopment) {
38-
return path.resolve('..', '.env.development');
39-
}
36+
if (isDevelopment) {
37+
return path.resolve('..', '.env.development');
38+
}
4039

41-
return path.resolve('..', '.env');
40+
return path.resolve('..', '.env');
4241
}

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ts-auto-mock",
33
"version": "1.0.0",
4-
"description": "ts auto mock website",
4+
"description": "ts-auto-mock website",
55
"main": "index.js",
66
"scripts": {
77
"docz:dev": "docz dev",

ui/src/copy/copy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
export const TsAutoMockCopy = {
2-
title: "Typescript transformer to create mocks for any types",
2+
title: "TypeScript transformer to create mocks for any type",
33
homeButton: "Get Started",
44
apiButton: "API Documentation",
55
slack: "Need help? Join us on Slack",
66
features: {
77
real: {
8-
title: "Real mocks",
9-
description: "The creation of the mocks is done during typescript compilation, it will preserve all the types information"
8+
title: "Real Mocks",
9+
description: "The creation of mocks is done during TypeScript compilation and preserves all type information."
1010
},
1111
extendible: {
1212
title: "Extendible",
13-
description: "This library can be used with any testing framework. You can provide your own implementation"
13+
description: "This library can be used with any testing framework. You can even provide your own implementation!"
1414
},
1515
typeSafety: {
1616
title: "Type Safety",
17-
description: "No more casting to any to get your spy or your mock. This library provides a mechanism to get your spies and persists the types"
17+
description: "No more casting to `any' to get your spy or mock. This library provides a mechanism to inject your spies while preserving their types."
1818
}
1919
}
2020
}

ui/src/core/logo/logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ import logoDark from './logo_dark.svg';
1010
export function Logo(): JSX.Element {
1111
const theme = useTheme();
1212
const logo = theme === Theme.LIGHT ? logoLight : logoDark;
13-
return <img src={logo} alt={"ts auto mock logo"}/>
13+
return <img src={logo} alt={"TS auto mock logo"}/>
1414
}

0 commit comments

Comments
 (0)