Skip to content

Commit

Permalink
test(tool): add test cases for required dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
taccisum committed Jul 3, 2019
1 parent e929c62 commit 67951e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions generators/test/app/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ describe('generate app', () => {
describe('swagger', () => {
it('should have dependency', () => {
assert.fileContent([
['foo-service-provider/pom.xml', /<artifactId>swagger-spring-boot2-starter<\/artifactId>/]
['foo-service-provider/pom.xml', /<artifactId>foo-service-api<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>spring-boot-starter-web<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>guava<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>commons-lang3<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>lombok<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>spring-boot-devtools<\/artifactId>/],
['foo-service-provider/pom.xml', /<artifactId>spring-boot-maven-plugin<\/artifactId>/]
])
});

it('should have properties', () => {
assert(yaml.safeLoad(fs.readFileSync('foo-service-provider/src/main/resources/application.yml')).swagger);
const appYaml = yaml.safeLoad(fs.readFileSync('foo-service-provider/src/main/resources/application.yml'));
assert(appYaml.swagger);
assert(appYaml.spring.application.name);
});

it('should disabled on env prod', () => {
Expand Down

0 comments on commit 67951e3

Please sign in to comment.