Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ The project is very much Work In Progress and will be published on maven central
# Release Notes
BOAT is still under development and subject to change.

## 0.16.10
* Boat Angular generator
* Remove types from generated mock providers due to a TypeScript which prevents `/*#__PURE__*/` annotation from working
## 0.16.9
* Boat Angular generator
* Use of `/*#__PURE__*/` for `createMocks` function call in templates to enable tree-shaking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const {{nickname}}Examples = [
/**
* Mocks provider for {{{basePathWithoutHost}}}{{pattern}} URL pattern
*/
export const {{classname}}{{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}MocksProvider: Provider = /*#__PURE__*/ createMocks({{nickname}}Examples);
export const {{classname}}{{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}MocksProvider = /*#__PURE__*/ createMocks({{nickname}}Examples);

{{/operation}}
{{/operations}}
export const {{classname}}MocksProvider: Provider = /*#__PURE__*/ createMocks({{baseName}}Examples);
export const {{classname}}MocksProvider = /*#__PURE__*/ createMocks({{baseName}}Examples);


Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Provider } from '@angular/core';
/**
* Mocks provider for {{{basePathWithoutHost}}}{{pattern}} URL pattern
*/
export const {{classname}}{{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}MocksProvider: Provider = /*#__PURE__*/ createMocks([{
export const {{classname}}{{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}MocksProvider = /*#__PURE__*/ createMocks([{
urlPattern: "{{{basePathWithoutHost}}}{{pattern}}",
method: "{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}",
responses: [
Expand Down Expand Up @@ -37,7 +37,7 @@ export const {{classname}}{{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}
{{/operation}}
{{/operations}}

export const {{classname}}MocksProvider: Provider = /*#__PURE__*/ createMocks(
export const {{classname}}MocksProvider = /*#__PURE__*/ createMocks(
[{{#operations}}
{{#operation}}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void npmRepository() {
@Check
public void withMocks() {
assertThat(
findPattern(selectFiles("/api/.+\\.service\\.mocks\\.ts$"), "MocksProvider: Provider = /\\*#__PURE__\\*/ createMocks"),
findPattern(selectFiles("/api/.+\\.service\\.mocks\\.ts$"), "MocksProvider = /\\*#__PURE__\\*/ createMocks"),
equalTo(this.param.withMocks));
}

Expand Down