From ed590c85fc85217769fb41b3062cd1a6fe78dcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 4 Feb 2019 08:56:04 +0100 Subject: [PATCH] build: move test files to `src/__tests__` in packages - Source files are compiled from `src/{foo}` to `dist/{foo}`, the same pattern is applied to test files too. - Both TypeScript sources and JavaScript output are stored in the same path relative to project root. This makes it much easier to refer to test fixtures. This is a follow-up for 066d52510cda and 91a37dca4214. --- .nycrc | 3 +-- .vscode/launch.json | 2 +- benchmark/package.json | 2 +- .../__tests__}/benchmark.integration.ts | 2 +- benchmark/{test => src/__tests__}/mocha.opts | 0 package.json | 2 +- packages/authentication/package.json | 14 +++++++------- .../acceptance/basic-auth.acceptance.ts | 0 .../{test => src/__tests__}/acceptance/feature.md | 0 .../__tests__}/integration/smoke.integration.ts | 0 .../decorators/authenticate.decorator.unit.ts | 0 .../__tests__}/unit/fixtures/mock-strategy.ts | 0 .../unit/providers/auth-metadata.provider.unit.ts | 2 +- .../providers/authentication.provider.unit.ts | 2 +- .../__tests__}/unit/strategy-adapter.unit.ts | 0 packages/authentication/tsconfig.build.json | 4 ++-- packages/boot/package.json | 15 +++++++-------- .../application-metadata.booter.acceptance.ts | 0 .../acceptance/controller.booter.acceptance.ts | 0 .../__tests__}/fixtures/application.ts | 0 .../__tests__}/fixtures/datasource.artifact.ts | 0 .../__tests__}/fixtures/empty.artifact.ts | 0 .../__tests__}/fixtures/multiple.artifact.ts | 0 .../{test => src/__tests__}/fixtures/package.json | 0 .../__tests__}/fixtures/service-class.artifact.ts | 0 .../fixtures/service-provider.artifact.ts | 0 .../integration/controller.booter.integration.ts | 0 .../integration/datasource.booter.integration.ts | 0 .../integration/repository.booter.integration.ts | 0 .../integration/service.booter.integration.ts | 0 .../__tests__}/unit/boot.component.unit.ts | 0 .../unit/booters/base-artifact.booter.unit.ts | 0 .../__tests__}/unit/booters/booter-utils.unit.ts | 0 .../unit/booters/controller.booter.unit.ts | 0 .../unit/booters/datasource.booter.unit.ts | 0 .../unit/booters/repository.booter.unit.ts | 0 .../unit/booters/service.booter.unit.ts | 0 .../__tests__}/unit/bootstrapper.unit.ts | 0 .../__tests__}/unit/mixins/boot.mixin.unit.ts | 0 packages/boot/tsconfig.build.json | 4 ++-- packages/build/bin/select-dist.js | 2 +- packages/context/package.json | 12 ++++++------ .../__tests__}/acceptance/1-feature.md | 0 .../acceptance/bind-decorator.acceptance.ts | 9 +++++++-- .../acceptance/binding-decorator.feature.md | 0 .../acceptance/child-context.acceptance.ts | 0 .../acceptance/class-level-bindings.acceptance.ts | 0 .../acceptance/class-level-bindings.feature.md | 0 .../creating-and-resolving-bindings.acceptance.ts | 0 .../creating-and-resolving-bindings.feature.md | 0 .../acceptance/finding-bindings.acceptance.ts | 0 .../acceptance/finding-bindings.feature.md | 0 .../acceptance/locking-bindings.acceptance.ts | 0 .../acceptance/locking-bindings.feature.md | 0 .../method-level-bindings.acceptance.ts | 0 .../acceptance/method-level-bindings.feature.md | 0 .../acceptance/tagged-bindings.acceptance.ts | 0 .../acceptance/tagged-bindings.feature.md | 0 .../acceptance/unlocking-bindings.acceptance.ts | 0 .../acceptance/unlocking-bindings.feature.md | 0 .../__tests__}/unit/binding-decorator.unit.ts | 0 .../__tests__}/unit/binding-filter.unit.ts | 0 .../__tests__}/unit/binding-inspector.unit.ts | 2 +- .../__tests__}/unit/binding-key.unit.ts | 0 .../{test => src/__tests__}/unit/binding.unit.ts | 0 .../{test => src/__tests__}/unit/context.unit.ts | 0 .../{test => src/__tests__}/unit/inject.unit.ts | 0 .../__tests__}/unit/is-promise.unit.ts | 0 .../{test => src/__tests__}/unit/provider.unit.ts | 0 .../__tests__}/unit/resolution-session.unit.ts | 0 .../{test => src/__tests__}/unit/resolver.unit.ts | 0 .../__tests__}/unit/value-promise.unit.ts | 0 packages/context/tsconfig.build.json | 4 ++-- packages/core/package.json | 14 +++++++------- .../acceptance/application.acceptance.ts | 0 .../__tests__}/acceptance/application.feature.md | 0 .../__tests__}/unit/application.unit.ts | 0 packages/core/tsconfig.build.json | 4 ++-- packages/http-caching-proxy/package.json | 8 ++++---- .../integration/http-caching-proxy.integration.ts | 2 +- .../__tests__}/unit/http-caching-proxy.test.ts | 2 +- packages/http-caching-proxy/tsconfig.build.json | 4 ++-- packages/http-server/package.json | 8 ++++---- .../integration/http-server.integration.ts | 0 packages/http-server/tsconfig.build.json | 4 ++-- packages/metadata/package.json | 12 ++++++------ .../__tests__}/unit/decorator-factory.unit.ts | 0 .../__tests__}/unit/inspector.unit.ts | 0 .../__tests__}/unit/metadata-accessor.test.ts | 0 .../{test => src/__tests__}/unit/reflect.unit.ts | 2 +- packages/metadata/tsconfig.build.json | 4 ++-- packages/openapi-spec-builder/package.json | 6 +++--- packages/openapi-spec-builder/tsconfig.build.json | 4 ++-- packages/openapi-v3-types/package.json | 10 +++++----- .../__tests__}/unit/openapi-v3-spec-types.unit.ts | 0 .../__tests__}/unit/type-guards.unit.ts | 0 packages/openapi-v3-types/tsconfig.build.json | 4 ++-- packages/openapi-v3/package.json | 12 ++++++------ .../integration/controller-spec.integration.ts | 14 ++++++++++---- .../integration/operation-spec.integration.ts | 0 .../unit/decorators/operation.decorator.unit.ts | 0 .../param/param-header.decorator.unit.ts | 0 .../decorators/param/param-path.decorator.unit.ts | 0 .../param/param-query.decorator.unit.ts | 0 .../unit/decorators/param/param.decorator.unit.ts | 0 .../request-body-primitives.decorator.unit.ts | 0 .../request-body-shortcut.decorator.unit.ts | 0 .../request-body/request-body.decorator.unit.ts | 0 .../__tests__}/unit/filter-schema.unit.ts | 0 .../__tests__}/unit/generate-schema.unit.ts | 2 +- .../__tests__}/unit/json-to-schema.unit.ts | 0 packages/openapi-v3/tsconfig.build.json | 12 ++++++------ packages/repository-json-schema/package.json | 8 ++++---- .../integration/build-schema.integration.ts | 0 .../__tests__}/unit/build-schema.unit.ts | 0 .../__tests__}/unit/filter-json-schema.unit.ts | 2 +- .../__tests__}/unit/json-schema.unit.ts | 0 .../repository-json-schema/tsconfig.build.json | 4 ++-- packages/repository/package.json | 10 +++++----- .../acceptance/belongs-to.relation.acceptance.ts | 0 .../has-many-without-di.relation.acceptance.ts | 0 .../acceptance/has-many.relation.acceptance.ts | 0 .../acceptance/has-one.relation.acceptance.ts | 0 .../acceptance/repository.acceptance.ts | 0 .../__tests__}/fixtures/models/address.model.ts | 0 .../__tests__}/fixtures/models/customer.model.ts | 0 .../__tests__}/fixtures/models/index.ts | 0 .../__tests__}/fixtures/models/order.model.ts | 0 .../__tests__}/fixtures/models/product.model.ts | 0 .../fixtures/repositories/address.repository.ts | 0 .../fixtures/repositories/customer.repository.ts | 0 .../__tests__}/fixtures/repositories/index.ts | 0 .../fixtures/repositories/order.repository.ts | 0 .../fixtures/repositories/product.repository.ts | 0 .../repositories/relation.factory.integration.ts | 0 .../__tests__}/unit/decorator/metadata.unit.ts | 0 .../model-and-relation.decorator.unit.ts | 0 .../unit/decorator/relation.decorator.unit.ts | 0 .../repository-with-di.decorator.unit.ts | 0 ...pository-with-value-provider.decorator.unit.ts | 0 .../unit/decorator/repository.decorator.unit.ts | 0 .../unit/errors/entity-not-found-error.test.ts | 0 .../unit/errors/invalid-relation-error.test.ts | 0 .../unit/mixins/repository.mixin.unit.ts | 0 .../__tests__}/unit/model/model.unit.ts | 0 .../__tests__}/unit/query/query-builder.unit.ts | 0 .../belongs-to-repository-factory.unit.ts | 0 .../unit/repositories/constraint-utils.unit.ts | 0 .../unit/repositories/crud.repository.unit.ts | 0 .../has-many-repository-factory.unit.ts | 0 .../has-one-repository-factory.unit.ts | 0 .../repositories/kv.repository.bridge.unit.ts | 0 .../repositories/legacy-juggler-bridge.unit.ts | 0 .../unit/repositories/relation.repository.unit.ts | 0 .../__tests__}/unit/type-resolver.unit.ts | 6 +----- .../__tests__}/unit/type/type.unit.ts | 0 packages/repository/tsconfig.build.json | 4 ++-- packages/rest-explorer/package.json | 6 +++--- .../acceptance/rest-explorer.acceptance.ts | 0 .../rest-explorer/src/rest-explorer.controller.ts | 2 +- packages/rest-explorer/tsconfig.build.json | 4 ++-- packages/rest/package.json | 14 +++++++------- .../acceptance/bootstrapping/rest.acceptance.ts | 0 .../acceptance/coercion/coercion.acceptance.ts | 0 .../file-upload-with-parser.acceptance.ts | 0 .../file-upload/file-upload.acceptance.ts | 0 .../acceptance/module-exporting/feature.md | 0 .../request-parsing/request-parsing.acceptance.ts | 0 .../__tests__}/acceptance/routing/feature.md | 0 .../acceptance/routing/routing.acceptance.ts | 0 .../acceptance/sequence/sequence.acceptance.ts | 0 .../validation/validation.acceptance.ts | 0 packages/rest/{test => src/__tests__}/helpers.ts | 0 .../integration/http-handler.integration.ts | 0 .../integration/rest.application.integration.ts | 0 .../integration/rest.server.integration.ts | 0 .../__tests__}/unit/body-parser.unit.ts | 2 +- .../unit/coercion/invalid-spec.unit.test.ts | 0 .../__tests__}/unit/coercion/paramObject.unit.ts | 0 .../unit/coercion/paramStringToBoolean.unit.ts | 0 .../unit/coercion/paramStringToBuffer.unit.ts | 0 .../unit/coercion/paramStringToDate.unit.ts | 0 .../unit/coercion/paramStringToInteger.unit.ts | 0 .../unit/coercion/paramStringToNumber.unit.ts | 0 .../unit/coercion/paramStringToString.unit.ts | 0 .../unit/coercion/parseStringToDatetime.unit.ts | 0 .../__tests__}/unit/coercion/utils.ts | 0 .../{test => src/__tests__}/unit/parser.unit.ts | 0 .../__tests__}/unit/re-export.unit.ts | 0 .../unit/request-body.validator.test.ts | 2 +- .../rest.application/rest.application.unit.ts | 0 .../__tests__}/unit/rest.component.unit.ts | 0 .../rest.server/rest.server.controller.unit.ts | 0 .../rest.server/rest.server.open-api-spec.unit.ts | 0 .../unit/rest.server/rest.server.unit.ts | 0 .../unit/router/controller-factory.unit.ts | 0 .../unit/router/controller-route.unit.ts | 0 .../__tests__}/unit/router/openapi-path.unit.ts | 0 .../unit/router/reject.provider.unit.ts | 0 .../__tests__}/unit/router/route-sort.unit.ts | 0 .../__tests__}/unit/router/routing-table.unit.ts | 0 .../__tests__}/unit/router/trie-router.unit.ts | 5 ++--- .../__tests__}/unit/router/trie.unit.ts | 0 .../{test => src/__tests__}/unit/writer.unit.ts | 0 packages/rest/tsconfig.build.json | 4 ++-- packages/service-proxy/package.json | 14 +++++++------- .../integration/service-proxy.integration.ts | 0 .../__tests__}/mock-service.connector.ts | 0 .../decorators/service-proxy.decorator.unit.ts | 0 .../__tests__}/unit/mixin/service.mixin.unit.ts | 0 packages/service-proxy/tsconfig.build.json | 4 ++-- 211 files changed, 152 insertions(+), 148 deletions(-) rename benchmark/{test => src/__tests__}/benchmark.integration.ts (96%) rename benchmark/{test => src/__tests__}/mocha.opts (100%) rename packages/authentication/{test => src/__tests__}/acceptance/basic-auth.acceptance.ts (100%) rename packages/authentication/{test => src/__tests__}/acceptance/feature.md (100%) rename packages/authentication/{test => src/__tests__}/integration/smoke.integration.ts (100%) rename packages/authentication/{test => src/__tests__}/unit/decorators/authenticate.decorator.unit.ts (100%) rename packages/authentication/{test => src/__tests__}/unit/fixtures/mock-strategy.ts (100%) rename packages/authentication/{test => src/__tests__}/unit/providers/auth-metadata.provider.unit.ts (97%) rename packages/authentication/{test => src/__tests__}/unit/providers/authentication.provider.unit.ts (98%) rename packages/authentication/{test => src/__tests__}/unit/strategy-adapter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/acceptance/application-metadata.booter.acceptance.ts (100%) rename packages/boot/{test => src/__tests__}/acceptance/controller.booter.acceptance.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/application.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/datasource.artifact.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/empty.artifact.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/multiple.artifact.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/package.json (100%) rename packages/boot/{test => src/__tests__}/fixtures/service-class.artifact.ts (100%) rename packages/boot/{test => src/__tests__}/fixtures/service-provider.artifact.ts (100%) rename packages/boot/{test => src/__tests__}/integration/controller.booter.integration.ts (100%) rename packages/boot/{test => src/__tests__}/integration/datasource.booter.integration.ts (100%) rename packages/boot/{test => src/__tests__}/integration/repository.booter.integration.ts (100%) rename packages/boot/{test => src/__tests__}/integration/service.booter.integration.ts (100%) rename packages/boot/{test => src/__tests__}/unit/boot.component.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/base-artifact.booter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/booter-utils.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/controller.booter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/datasource.booter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/repository.booter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/booters/service.booter.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/bootstrapper.unit.ts (100%) rename packages/boot/{test => src/__tests__}/unit/mixins/boot.mixin.unit.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/1-feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/bind-decorator.acceptance.ts (94%) rename packages/context/{test => src/__tests__}/acceptance/binding-decorator.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/child-context.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/class-level-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/class-level-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/creating-and-resolving-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/creating-and-resolving-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/finding-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/finding-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/locking-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/locking-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/method-level-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/method-level-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/tagged-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/tagged-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/acceptance/unlocking-bindings.acceptance.ts (100%) rename packages/context/{test => src/__tests__}/acceptance/unlocking-bindings.feature.md (100%) rename packages/context/{test => src/__tests__}/unit/binding-decorator.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/binding-filter.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/binding-inspector.unit.ts (99%) rename packages/context/{test => src/__tests__}/unit/binding-key.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/binding.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/context.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/inject.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/is-promise.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/provider.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/resolution-session.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/resolver.unit.ts (100%) rename packages/context/{test => src/__tests__}/unit/value-promise.unit.ts (100%) rename packages/core/{test => src/__tests__}/acceptance/application.acceptance.ts (100%) rename packages/core/{test => src/__tests__}/acceptance/application.feature.md (100%) rename packages/core/{test => src/__tests__}/unit/application.unit.ts (100%) rename packages/http-caching-proxy/{test => src/__tests__}/integration/http-caching-proxy.integration.ts (98%) rename packages/http-caching-proxy/{test => src/__tests__}/unit/http-caching-proxy.test.ts (90%) rename packages/http-server/{test => src/__tests__}/integration/http-server.integration.ts (100%) rename packages/metadata/{test => src/__tests__}/unit/decorator-factory.unit.ts (100%) rename packages/metadata/{test => src/__tests__}/unit/inspector.unit.ts (100%) rename packages/metadata/{test => src/__tests__}/unit/metadata-accessor.test.ts (100%) rename packages/metadata/{test => src/__tests__}/unit/reflect.unit.ts (99%) rename packages/openapi-v3-types/{test => src/__tests__}/unit/openapi-v3-spec-types.unit.ts (100%) rename packages/openapi-v3-types/{test => src/__tests__}/unit/type-guards.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/integration/controller-spec.integration.ts (98%) rename packages/openapi-v3/{test => src/__tests__}/integration/operation-spec.integration.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/operation.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/param/param-header.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/param/param-path.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/param/param-query.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/param/param.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/request-body/request-body-primitives.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/decorators/request-body/request-body.decorator.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/filter-schema.unit.ts (100%) rename packages/openapi-v3/{test => src/__tests__}/unit/generate-schema.unit.ts (96%) rename packages/openapi-v3/{test => src/__tests__}/unit/json-to-schema.unit.ts (100%) rename packages/repository-json-schema/{test => src/__tests__}/integration/build-schema.integration.ts (100%) rename packages/repository-json-schema/{test => src/__tests__}/unit/build-schema.unit.ts (100%) rename packages/repository-json-schema/{test => src/__tests__}/unit/filter-json-schema.unit.ts (99%) rename packages/repository-json-schema/{test => src/__tests__}/unit/json-schema.unit.ts (100%) rename packages/repository/{test => src/__tests__}/acceptance/belongs-to.relation.acceptance.ts (100%) rename packages/repository/{test => src/__tests__}/acceptance/has-many-without-di.relation.acceptance.ts (100%) rename packages/repository/{test => src/__tests__}/acceptance/has-many.relation.acceptance.ts (100%) rename packages/repository/{test => src/__tests__}/acceptance/has-one.relation.acceptance.ts (100%) rename packages/repository/{test => src/__tests__}/acceptance/repository.acceptance.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/models/address.model.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/models/customer.model.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/models/index.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/models/order.model.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/models/product.model.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/repositories/address.repository.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/repositories/customer.repository.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/repositories/index.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/repositories/order.repository.ts (100%) rename packages/repository/{test => src/__tests__}/fixtures/repositories/product.repository.ts (100%) rename packages/repository/{test => src/__tests__}/integration/repositories/relation.factory.integration.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/metadata.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/model-and-relation.decorator.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/relation.decorator.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/repository-with-di.decorator.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/repository-with-value-provider.decorator.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/decorator/repository.decorator.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/errors/entity-not-found-error.test.ts (100%) rename packages/repository/{test => src/__tests__}/unit/errors/invalid-relation-error.test.ts (100%) rename packages/repository/{test => src/__tests__}/unit/mixins/repository.mixin.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/model/model.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/query/query-builder.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/belongs-to-repository-factory.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/constraint-utils.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/crud.repository.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/has-many-repository-factory.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/has-one-repository-factory.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/kv.repository.bridge.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/legacy-juggler-bridge.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/repositories/relation.repository.unit.ts (100%) rename packages/repository/{test => src/__tests__}/unit/type-resolver.unit.ts (97%) rename packages/repository/{test => src/__tests__}/unit/type/type.unit.ts (100%) rename packages/rest-explorer/{test => src/__tests__}/acceptance/rest-explorer.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/bootstrapping/rest.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/coercion/coercion.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/file-upload/file-upload-with-parser.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/file-upload/file-upload.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/module-exporting/feature.md (100%) rename packages/rest/{test => src/__tests__}/acceptance/request-parsing/request-parsing.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/routing/feature.md (100%) rename packages/rest/{test => src/__tests__}/acceptance/routing/routing.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/sequence/sequence.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/acceptance/validation/validation.acceptance.ts (100%) rename packages/rest/{test => src/__tests__}/helpers.ts (100%) rename packages/rest/{test => src/__tests__}/integration/http-handler.integration.ts (100%) rename packages/rest/{test => src/__tests__}/integration/rest.application.integration.ts (100%) rename packages/rest/{test => src/__tests__}/integration/rest.server.integration.ts (100%) rename packages/rest/{test => src/__tests__}/unit/body-parser.unit.ts (99%) rename packages/rest/{test => src/__tests__}/unit/coercion/invalid-spec.unit.test.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramObject.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToBoolean.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToBuffer.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToDate.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToInteger.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToNumber.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/paramStringToString.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/parseStringToDatetime.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/coercion/utils.ts (100%) rename packages/rest/{test => src/__tests__}/unit/parser.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/re-export.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/request-body.validator.test.ts (99%) rename packages/rest/{test => src/__tests__}/unit/rest.application/rest.application.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/rest.component.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/rest.server/rest.server.controller.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/rest.server/rest.server.open-api-spec.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/rest.server/rest.server.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/controller-factory.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/controller-route.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/openapi-path.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/reject.provider.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/route-sort.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/routing-table.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/router/trie-router.unit.ts (98%) rename packages/rest/{test => src/__tests__}/unit/router/trie.unit.ts (100%) rename packages/rest/{test => src/__tests__}/unit/writer.unit.ts (100%) rename packages/service-proxy/{test => src/__tests__}/integration/service-proxy.integration.ts (100%) rename packages/service-proxy/{test => src/__tests__}/mock-service.connector.ts (100%) rename packages/service-proxy/{test => src/__tests__}/unit/decorators/service-proxy.decorator.unit.ts (100%) rename packages/service-proxy/{test => src/__tests__}/unit/mixin/service.mixin.unit.ts (100%) diff --git a/.nycrc b/.nycrc index b63ce22107ba..a4002961feff 100644 --- a/.nycrc +++ b/.nycrc @@ -5,10 +5,9 @@ "examples/*/dist" ], "exclude": [ - "packages/*/dist/test/", "packages/*/dist/__tests__/", "packages/cli/test/", - "examples/*/dist/test/", + "examples/*/dist/__tests__/", "**/.sandbox/" ], "extension": [ diff --git a/.vscode/launch.json b/.vscode/launch.json index 8f47306af72a..11796409be2a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,7 @@ "args": [ "--opts", "${workspaceRoot}/test/mocha.opts", - "packages/*/dist/test/**/*.js", + "packages/*/dist/__tests__/**/*.js", "-t", "0" ] diff --git a/benchmark/package.json b/benchmark/package.json index 30baf2324098..01d82f0d20c7 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -16,7 +16,7 @@ "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean dist", "pretest": "npm run clean && npm run build", - "test": "lb-mocha \"dist/test\"", + "test": "lb-mocha \"dist/__tests__\"", "prestart": "npm run build", "benchmark:routing": "node ./dist/src/rest-routing/routing-table", "start": "node ." diff --git a/benchmark/test/benchmark.integration.ts b/benchmark/src/__tests__/benchmark.integration.ts similarity index 96% rename from benchmark/test/benchmark.integration.ts rename to benchmark/src/__tests__/benchmark.integration.ts index eaa9f7f6bb19..d6d919077f74 100644 --- a/benchmark/test/benchmark.integration.ts +++ b/benchmark/src/__tests__/benchmark.integration.ts @@ -6,7 +6,7 @@ import {expect} from '@loopback/testlab'; import * as request from 'request-promise-native'; import {Benchmark} from '..'; -import {Autocannon, EndpointStats} from '../src/autocannon'; +import {Autocannon, EndpointStats} from '../autocannon'; const debug = require('debug')('test'); diff --git a/benchmark/test/mocha.opts b/benchmark/src/__tests__/mocha.opts similarity index 100% rename from benchmark/test/mocha.opts rename to benchmark/src/__tests__/mocha.opts diff --git a/package.json b/package.json index b1b316994998..fb9eca54cca2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test:ci": "node packages/build/bin/run-nyc npm run mocha --scripts-prepend-node-path", "verify:docs": "npm run build:site -- --verify", "build:site": "./bin/build-docs-site.sh", - "mocha": "node packages/build/bin/run-mocha \"packages/*/dist/test/**/*.js\" \"packages/*/dist/__tests__/**/*.js\" \"examples/*/dist/__tests__/**/*.js\" \"packages/cli/test/**/*.js\" \"packages/build/test/*/*.js\"", + "mocha": "node packages/build/bin/run-mocha \"packages/*/dist/__tests__/**/*.js\" \"examples/*/dist/__tests__/**/*.js\" \"packages/cli/test/**/*.js\" \"packages/build/test/*/*.js\"", "posttest": "npm run lint" }, "config": { diff --git a/packages/authentication/package.json b/packages/authentication/package.json index dc9c95163465..688c2f200ae1 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -6,14 +6,14 @@ "node": ">=8.9" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-authentication*.tgz dist package api-docs", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-authentication*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -46,9 +46,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/authentication/test/acceptance/basic-auth.acceptance.ts b/packages/authentication/src/__tests__/acceptance/basic-auth.acceptance.ts similarity index 100% rename from packages/authentication/test/acceptance/basic-auth.acceptance.ts rename to packages/authentication/src/__tests__/acceptance/basic-auth.acceptance.ts diff --git a/packages/authentication/test/acceptance/feature.md b/packages/authentication/src/__tests__/acceptance/feature.md similarity index 100% rename from packages/authentication/test/acceptance/feature.md rename to packages/authentication/src/__tests__/acceptance/feature.md diff --git a/packages/authentication/test/integration/smoke.integration.ts b/packages/authentication/src/__tests__/integration/smoke.integration.ts similarity index 100% rename from packages/authentication/test/integration/smoke.integration.ts rename to packages/authentication/src/__tests__/integration/smoke.integration.ts diff --git a/packages/authentication/test/unit/decorators/authenticate.decorator.unit.ts b/packages/authentication/src/__tests__/unit/decorators/authenticate.decorator.unit.ts similarity index 100% rename from packages/authentication/test/unit/decorators/authenticate.decorator.unit.ts rename to packages/authentication/src/__tests__/unit/decorators/authenticate.decorator.unit.ts diff --git a/packages/authentication/test/unit/fixtures/mock-strategy.ts b/packages/authentication/src/__tests__/unit/fixtures/mock-strategy.ts similarity index 100% rename from packages/authentication/test/unit/fixtures/mock-strategy.ts rename to packages/authentication/src/__tests__/unit/fixtures/mock-strategy.ts diff --git a/packages/authentication/test/unit/providers/auth-metadata.provider.unit.ts b/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts similarity index 97% rename from packages/authentication/test/unit/providers/auth-metadata.provider.unit.ts rename to packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts index bfe74652cc36..03602701bac3 100644 --- a/packages/authentication/test/unit/providers/auth-metadata.provider.unit.ts +++ b/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts @@ -7,7 +7,7 @@ import {expect} from '@loopback/testlab'; import {CoreBindings} from '@loopback/core'; import {Context, Provider} from '@loopback/context'; import {AuthenticationMetadata, authenticate} from '../../..'; -import {AuthMetadataProvider} from '../../../src/providers'; +import {AuthMetadataProvider} from '../../../providers'; describe('AuthMetadataProvider', () => { let provider: Provider; diff --git a/packages/authentication/test/unit/providers/authentication.provider.unit.ts b/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts similarity index 98% rename from packages/authentication/test/unit/providers/authentication.provider.unit.ts rename to packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts index 0c727be83e7b..709ebcab74ff 100644 --- a/packages/authentication/test/unit/providers/authentication.provider.unit.ts +++ b/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts @@ -9,7 +9,7 @@ import {Request} from '@loopback/rest'; import {AuthenticateFn, UserProfile, AuthenticationBindings} from '../../..'; import {MockStrategy} from '../fixtures/mock-strategy'; import {Strategy} from 'passport'; -import {AuthenticateActionProvider} from '../../../src/providers'; +import {AuthenticateActionProvider} from '../../../providers'; describe('AuthenticateActionProvider', () => { describe('constructor()', () => { diff --git a/packages/authentication/test/unit/strategy-adapter.unit.ts b/packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts similarity index 100% rename from packages/authentication/test/unit/strategy-adapter.unit.ts rename to packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts diff --git a/packages/authentication/tsconfig.build.json b/packages/authentication/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/authentication/tsconfig.build.json +++ b/packages/authentication/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/boot/package.json b/packages/boot/package.json index 8d2a92ab10c6..e9aee8c0bb8a 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -9,14 +9,14 @@ "access": "public" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-boot*.tgz dist package api-docs", "pretest": "npm run build", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-boot*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -43,11 +43,10 @@ "files": [ "README.md", "index.js", - "index.js.map", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/boot/test/acceptance/application-metadata.booter.acceptance.ts b/packages/boot/src/__tests__/acceptance/application-metadata.booter.acceptance.ts similarity index 100% rename from packages/boot/test/acceptance/application-metadata.booter.acceptance.ts rename to packages/boot/src/__tests__/acceptance/application-metadata.booter.acceptance.ts diff --git a/packages/boot/test/acceptance/controller.booter.acceptance.ts b/packages/boot/src/__tests__/acceptance/controller.booter.acceptance.ts similarity index 100% rename from packages/boot/test/acceptance/controller.booter.acceptance.ts rename to packages/boot/src/__tests__/acceptance/controller.booter.acceptance.ts diff --git a/packages/boot/test/fixtures/application.ts b/packages/boot/src/__tests__/fixtures/application.ts similarity index 100% rename from packages/boot/test/fixtures/application.ts rename to packages/boot/src/__tests__/fixtures/application.ts diff --git a/packages/boot/test/fixtures/datasource.artifact.ts b/packages/boot/src/__tests__/fixtures/datasource.artifact.ts similarity index 100% rename from packages/boot/test/fixtures/datasource.artifact.ts rename to packages/boot/src/__tests__/fixtures/datasource.artifact.ts diff --git a/packages/boot/test/fixtures/empty.artifact.ts b/packages/boot/src/__tests__/fixtures/empty.artifact.ts similarity index 100% rename from packages/boot/test/fixtures/empty.artifact.ts rename to packages/boot/src/__tests__/fixtures/empty.artifact.ts diff --git a/packages/boot/test/fixtures/multiple.artifact.ts b/packages/boot/src/__tests__/fixtures/multiple.artifact.ts similarity index 100% rename from packages/boot/test/fixtures/multiple.artifact.ts rename to packages/boot/src/__tests__/fixtures/multiple.artifact.ts diff --git a/packages/boot/test/fixtures/package.json b/packages/boot/src/__tests__/fixtures/package.json similarity index 100% rename from packages/boot/test/fixtures/package.json rename to packages/boot/src/__tests__/fixtures/package.json diff --git a/packages/boot/test/fixtures/service-class.artifact.ts b/packages/boot/src/__tests__/fixtures/service-class.artifact.ts similarity index 100% rename from packages/boot/test/fixtures/service-class.artifact.ts rename to packages/boot/src/__tests__/fixtures/service-class.artifact.ts diff --git a/packages/boot/test/fixtures/service-provider.artifact.ts b/packages/boot/src/__tests__/fixtures/service-provider.artifact.ts similarity index 100% rename from packages/boot/test/fixtures/service-provider.artifact.ts rename to packages/boot/src/__tests__/fixtures/service-provider.artifact.ts diff --git a/packages/boot/test/integration/controller.booter.integration.ts b/packages/boot/src/__tests__/integration/controller.booter.integration.ts similarity index 100% rename from packages/boot/test/integration/controller.booter.integration.ts rename to packages/boot/src/__tests__/integration/controller.booter.integration.ts diff --git a/packages/boot/test/integration/datasource.booter.integration.ts b/packages/boot/src/__tests__/integration/datasource.booter.integration.ts similarity index 100% rename from packages/boot/test/integration/datasource.booter.integration.ts rename to packages/boot/src/__tests__/integration/datasource.booter.integration.ts diff --git a/packages/boot/test/integration/repository.booter.integration.ts b/packages/boot/src/__tests__/integration/repository.booter.integration.ts similarity index 100% rename from packages/boot/test/integration/repository.booter.integration.ts rename to packages/boot/src/__tests__/integration/repository.booter.integration.ts diff --git a/packages/boot/test/integration/service.booter.integration.ts b/packages/boot/src/__tests__/integration/service.booter.integration.ts similarity index 100% rename from packages/boot/test/integration/service.booter.integration.ts rename to packages/boot/src/__tests__/integration/service.booter.integration.ts diff --git a/packages/boot/test/unit/boot.component.unit.ts b/packages/boot/src/__tests__/unit/boot.component.unit.ts similarity index 100% rename from packages/boot/test/unit/boot.component.unit.ts rename to packages/boot/src/__tests__/unit/boot.component.unit.ts diff --git a/packages/boot/test/unit/booters/base-artifact.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/base-artifact.booter.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/base-artifact.booter.unit.ts rename to packages/boot/src/__tests__/unit/booters/base-artifact.booter.unit.ts diff --git a/packages/boot/test/unit/booters/booter-utils.unit.ts b/packages/boot/src/__tests__/unit/booters/booter-utils.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/booter-utils.unit.ts rename to packages/boot/src/__tests__/unit/booters/booter-utils.unit.ts diff --git a/packages/boot/test/unit/booters/controller.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/controller.booter.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/controller.booter.unit.ts rename to packages/boot/src/__tests__/unit/booters/controller.booter.unit.ts diff --git a/packages/boot/test/unit/booters/datasource.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/datasource.booter.unit.ts rename to packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts diff --git a/packages/boot/test/unit/booters/repository.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/repository.booter.unit.ts rename to packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts diff --git a/packages/boot/test/unit/booters/service.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/service.booter.unit.ts similarity index 100% rename from packages/boot/test/unit/booters/service.booter.unit.ts rename to packages/boot/src/__tests__/unit/booters/service.booter.unit.ts diff --git a/packages/boot/test/unit/bootstrapper.unit.ts b/packages/boot/src/__tests__/unit/bootstrapper.unit.ts similarity index 100% rename from packages/boot/test/unit/bootstrapper.unit.ts rename to packages/boot/src/__tests__/unit/bootstrapper.unit.ts diff --git a/packages/boot/test/unit/mixins/boot.mixin.unit.ts b/packages/boot/src/__tests__/unit/mixins/boot.mixin.unit.ts similarity index 100% rename from packages/boot/test/unit/mixins/boot.mixin.unit.ts rename to packages/boot/src/__tests__/unit/mixins/boot.mixin.unit.ts diff --git a/packages/boot/tsconfig.build.json b/packages/boot/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/boot/tsconfig.build.json +++ b/packages/boot/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/build/bin/select-dist.js b/packages/build/bin/select-dist.js index 84dccbb4282a..13514b0274eb 100755 --- a/packages/build/bin/select-dist.js +++ b/packages/build/bin/select-dist.js @@ -18,7 +18,7 @@ Then the provided command is executed with the modified arguments. Example usage: - node ./bin/select-dist mocha dist/test + node ./bin/select-dist mocha dist/__tests__ ======== */ diff --git a/packages/context/package.json b/packages/context/package.json index a81f3ffec92e..a84fd97e78d3 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -6,13 +6,13 @@ "node": ">=8.9" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-context*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-context*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -46,9 +46,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/context/test/acceptance/1-feature.md b/packages/context/src/__tests__/acceptance/1-feature.md similarity index 100% rename from packages/context/test/acceptance/1-feature.md rename to packages/context/src/__tests__/acceptance/1-feature.md diff --git a/packages/context/test/acceptance/bind-decorator.acceptance.ts b/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts similarity index 94% rename from packages/context/test/acceptance/bind-decorator.acceptance.ts rename to packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts index a67ff0bf9070..696e024102eb 100644 --- a/packages/context/test/acceptance/bind-decorator.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts @@ -4,8 +4,13 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {Context, bind, BindingScope, Provider} from '../..'; -import {createBindingFromClass} from '../../src'; +import { + bind, + BindingScope, + Context, + createBindingFromClass, + Provider, +} from '../..'; describe('@bind - customize classes with binding attributes', () => { @bind({ diff --git a/packages/context/test/acceptance/binding-decorator.feature.md b/packages/context/src/__tests__/acceptance/binding-decorator.feature.md similarity index 100% rename from packages/context/test/acceptance/binding-decorator.feature.md rename to packages/context/src/__tests__/acceptance/binding-decorator.feature.md diff --git a/packages/context/test/acceptance/child-context.acceptance.ts b/packages/context/src/__tests__/acceptance/child-context.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/child-context.acceptance.ts rename to packages/context/src/__tests__/acceptance/child-context.acceptance.ts diff --git a/packages/context/test/acceptance/class-level-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/class-level-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/class-level-bindings.feature.md b/packages/context/src/__tests__/acceptance/class-level-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/class-level-bindings.feature.md rename to packages/context/src/__tests__/acceptance/class-level-bindings.feature.md diff --git a/packages/context/test/acceptance/creating-and-resolving-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/creating-and-resolving-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/creating-and-resolving-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/creating-and-resolving-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/creating-and-resolving-bindings.feature.md b/packages/context/src/__tests__/acceptance/creating-and-resolving-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/creating-and-resolving-bindings.feature.md rename to packages/context/src/__tests__/acceptance/creating-and-resolving-bindings.feature.md diff --git a/packages/context/test/acceptance/finding-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/finding-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/finding-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/finding-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/finding-bindings.feature.md b/packages/context/src/__tests__/acceptance/finding-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/finding-bindings.feature.md rename to packages/context/src/__tests__/acceptance/finding-bindings.feature.md diff --git a/packages/context/test/acceptance/locking-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/locking-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/locking-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/locking-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/locking-bindings.feature.md b/packages/context/src/__tests__/acceptance/locking-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/locking-bindings.feature.md rename to packages/context/src/__tests__/acceptance/locking-bindings.feature.md diff --git a/packages/context/test/acceptance/method-level-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/method-level-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/method-level-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/method-level-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/method-level-bindings.feature.md b/packages/context/src/__tests__/acceptance/method-level-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/method-level-bindings.feature.md rename to packages/context/src/__tests__/acceptance/method-level-bindings.feature.md diff --git a/packages/context/test/acceptance/tagged-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/tagged-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/tagged-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/tagged-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/tagged-bindings.feature.md b/packages/context/src/__tests__/acceptance/tagged-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/tagged-bindings.feature.md rename to packages/context/src/__tests__/acceptance/tagged-bindings.feature.md diff --git a/packages/context/test/acceptance/unlocking-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/unlocking-bindings.acceptance.ts similarity index 100% rename from packages/context/test/acceptance/unlocking-bindings.acceptance.ts rename to packages/context/src/__tests__/acceptance/unlocking-bindings.acceptance.ts diff --git a/packages/context/test/acceptance/unlocking-bindings.feature.md b/packages/context/src/__tests__/acceptance/unlocking-bindings.feature.md similarity index 100% rename from packages/context/test/acceptance/unlocking-bindings.feature.md rename to packages/context/src/__tests__/acceptance/unlocking-bindings.feature.md diff --git a/packages/context/test/unit/binding-decorator.unit.ts b/packages/context/src/__tests__/unit/binding-decorator.unit.ts similarity index 100% rename from packages/context/test/unit/binding-decorator.unit.ts rename to packages/context/src/__tests__/unit/binding-decorator.unit.ts diff --git a/packages/context/test/unit/binding-filter.unit.ts b/packages/context/src/__tests__/unit/binding-filter.unit.ts similarity index 100% rename from packages/context/test/unit/binding-filter.unit.ts rename to packages/context/src/__tests__/unit/binding-filter.unit.ts diff --git a/packages/context/test/unit/binding-inspector.unit.ts b/packages/context/src/__tests__/unit/binding-inspector.unit.ts similarity index 99% rename from packages/context/test/unit/binding-inspector.unit.ts rename to packages/context/src/__tests__/unit/binding-inspector.unit.ts index 39e470b7053f..b9d6976a5bd6 100644 --- a/packages/context/test/unit/binding-inspector.unit.ts +++ b/packages/context/src/__tests__/unit/binding-inspector.unit.ts @@ -6,6 +6,7 @@ import {expect} from '@loopback/testlab'; import { bind, + BindingFromClassOptions, BindingScope, BindingScopeAndTags, Constructor, @@ -13,7 +14,6 @@ import { createBindingFromClass, Provider, } from '../..'; -import {BindingFromClassOptions} from '../../src'; describe('createBindingFromClass()', () => { it('inspects classes', () => { diff --git a/packages/context/test/unit/binding-key.unit.ts b/packages/context/src/__tests__/unit/binding-key.unit.ts similarity index 100% rename from packages/context/test/unit/binding-key.unit.ts rename to packages/context/src/__tests__/unit/binding-key.unit.ts diff --git a/packages/context/test/unit/binding.unit.ts b/packages/context/src/__tests__/unit/binding.unit.ts similarity index 100% rename from packages/context/test/unit/binding.unit.ts rename to packages/context/src/__tests__/unit/binding.unit.ts diff --git a/packages/context/test/unit/context.unit.ts b/packages/context/src/__tests__/unit/context.unit.ts similarity index 100% rename from packages/context/test/unit/context.unit.ts rename to packages/context/src/__tests__/unit/context.unit.ts diff --git a/packages/context/test/unit/inject.unit.ts b/packages/context/src/__tests__/unit/inject.unit.ts similarity index 100% rename from packages/context/test/unit/inject.unit.ts rename to packages/context/src/__tests__/unit/inject.unit.ts diff --git a/packages/context/test/unit/is-promise.unit.ts b/packages/context/src/__tests__/unit/is-promise.unit.ts similarity index 100% rename from packages/context/test/unit/is-promise.unit.ts rename to packages/context/src/__tests__/unit/is-promise.unit.ts diff --git a/packages/context/test/unit/provider.unit.ts b/packages/context/src/__tests__/unit/provider.unit.ts similarity index 100% rename from packages/context/test/unit/provider.unit.ts rename to packages/context/src/__tests__/unit/provider.unit.ts diff --git a/packages/context/test/unit/resolution-session.unit.ts b/packages/context/src/__tests__/unit/resolution-session.unit.ts similarity index 100% rename from packages/context/test/unit/resolution-session.unit.ts rename to packages/context/src/__tests__/unit/resolution-session.unit.ts diff --git a/packages/context/test/unit/resolver.unit.ts b/packages/context/src/__tests__/unit/resolver.unit.ts similarity index 100% rename from packages/context/test/unit/resolver.unit.ts rename to packages/context/src/__tests__/unit/resolver.unit.ts diff --git a/packages/context/test/unit/value-promise.unit.ts b/packages/context/src/__tests__/unit/value-promise.unit.ts similarity index 100% rename from packages/context/test/unit/value-promise.unit.ts rename to packages/context/src/__tests__/unit/value-promise.unit.ts diff --git a/packages/context/tsconfig.build.json b/packages/context/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/context/tsconfig.build.json +++ b/packages/context/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/core/package.json b/packages/core/package.json index cd58ed730939..c1f13b20a3f1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -6,14 +6,14 @@ "node": ">=8.9" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-core*.tgz dist package api-docs", "pretest": "npm run build", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-core*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -32,9 +32,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/core/test/acceptance/application.acceptance.ts b/packages/core/src/__tests__/acceptance/application.acceptance.ts similarity index 100% rename from packages/core/test/acceptance/application.acceptance.ts rename to packages/core/src/__tests__/acceptance/application.acceptance.ts diff --git a/packages/core/test/acceptance/application.feature.md b/packages/core/src/__tests__/acceptance/application.feature.md similarity index 100% rename from packages/core/test/acceptance/application.feature.md rename to packages/core/src/__tests__/acceptance/application.feature.md diff --git a/packages/core/test/unit/application.unit.ts b/packages/core/src/__tests__/unit/application.unit.ts similarity index 100% rename from packages/core/test/unit/application.unit.ts rename to packages/core/src/__tests__/unit/application.unit.ts diff --git a/packages/core/tsconfig.build.json b/packages/core/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/core/tsconfig.build.json +++ b/packages/core/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/http-caching-proxy/package.json b/packages/http-caching-proxy/package.json index e07b754714b8..a8087f679914 100644 --- a/packages/http-caching-proxy/package.json +++ b/packages/http-caching-proxy/package.json @@ -10,7 +10,7 @@ "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-caching-proxy*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/integration/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/integration/**/*.js\"", "verify": "npm pack && tar xf loopback-caching-proxy*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -46,9 +46,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "publishConfig": { "access": "public" diff --git a/packages/http-caching-proxy/test/integration/http-caching-proxy.integration.ts b/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts similarity index 98% rename from packages/http-caching-proxy/test/integration/http-caching-proxy.integration.ts rename to packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts index 4302748fbe43..7375fd827e9b 100644 --- a/packages/http-caching-proxy/test/integration/http-caching-proxy.integration.ts +++ b/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts @@ -12,7 +12,7 @@ import * as path from 'path'; import * as makeRequest from 'request-promise-native'; import * as rimrafCb from 'rimraf'; import * as util from 'util'; -import {HttpCachingProxy, ProxyOptions} from '../../src/http-caching-proxy'; +import {HttpCachingProxy, ProxyOptions} from '../../http-caching-proxy'; const CACHE_DIR = path.join(__dirname, '.cache'); diff --git a/packages/http-caching-proxy/test/unit/http-caching-proxy.test.ts b/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts similarity index 90% rename from packages/http-caching-proxy/test/unit/http-caching-proxy.test.ts rename to packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts index df04524038fc..a6982b9f62ea 100644 --- a/packages/http-caching-proxy/test/unit/http-caching-proxy.test.ts +++ b/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {HttpCachingProxy} from '../../src/http-caching-proxy'; +import {HttpCachingProxy} from '../../http-caching-proxy'; describe('HttpCachingProxy', () => { describe('constructor', () => { diff --git a/packages/http-caching-proxy/tsconfig.build.json b/packages/http-caching-proxy/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/http-caching-proxy/tsconfig.build.json +++ b/packages/http-caching-proxy/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 412b0a5a3fe6..64439406d799 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -10,7 +10,7 @@ "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-http-server*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/**/*.js\"", "verify": "npm pack && tar xf loopback-http-server*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -33,9 +33,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "publishConfig": { "access": "public" diff --git a/packages/http-server/test/integration/http-server.integration.ts b/packages/http-server/src/__tests__/integration/http-server.integration.ts similarity index 100% rename from packages/http-server/test/integration/http-server.integration.ts rename to packages/http-server/src/__tests__/integration/http-server.integration.ts diff --git a/packages/http-server/tsconfig.build.json b/packages/http-server/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/http-server/tsconfig.build.json +++ b/packages/http-server/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/metadata/package.json b/packages/metadata/package.json index f76333506db2..21c237045ac7 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -6,13 +6,13 @@ "node": ">=8.9" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-metadata*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-metadata*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -40,9 +40,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "publishConfig": { "access": "public" diff --git a/packages/metadata/test/unit/decorator-factory.unit.ts b/packages/metadata/src/__tests__/unit/decorator-factory.unit.ts similarity index 100% rename from packages/metadata/test/unit/decorator-factory.unit.ts rename to packages/metadata/src/__tests__/unit/decorator-factory.unit.ts diff --git a/packages/metadata/test/unit/inspector.unit.ts b/packages/metadata/src/__tests__/unit/inspector.unit.ts similarity index 100% rename from packages/metadata/test/unit/inspector.unit.ts rename to packages/metadata/src/__tests__/unit/inspector.unit.ts diff --git a/packages/metadata/test/unit/metadata-accessor.test.ts b/packages/metadata/src/__tests__/unit/metadata-accessor.test.ts similarity index 100% rename from packages/metadata/test/unit/metadata-accessor.test.ts rename to packages/metadata/src/__tests__/unit/metadata-accessor.test.ts diff --git a/packages/metadata/test/unit/reflect.unit.ts b/packages/metadata/src/__tests__/unit/reflect.unit.ts similarity index 99% rename from packages/metadata/test/unit/reflect.unit.ts rename to packages/metadata/src/__tests__/unit/reflect.unit.ts index 82480460ab2a..fa9e99ceed18 100644 --- a/packages/metadata/test/unit/reflect.unit.ts +++ b/packages/metadata/src/__tests__/unit/reflect.unit.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {NamespacedReflect, Reflector} from '../../src/reflect'; +import {NamespacedReflect, Reflector} from '../../reflect'; import 'reflect-metadata'; function givenReflectContextWithNameSpace(): NamespacedReflect { diff --git a/packages/metadata/tsconfig.build.json b/packages/metadata/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/metadata/tsconfig.build.json +++ b/packages/metadata/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/openapi-spec-builder/package.json b/packages/openapi-spec-builder/package.json index 6a978ac79757..f4ee025d115a 100644 --- a/packages/openapi-spec-builder/package.json +++ b/packages/openapi-spec-builder/package.json @@ -33,9 +33,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/openapi-spec-builder/tsconfig.build.json b/packages/openapi-spec-builder/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/openapi-spec-builder/tsconfig.build.json +++ b/packages/openapi-spec-builder/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/openapi-v3-types/package.json b/packages/openapi-v3-types/package.json index c39f1fa6673f..4afccbb97ffa 100644 --- a/packages/openapi-v3-types/package.json +++ b/packages/openapi-v3-types/package.json @@ -20,8 +20,8 @@ "clean": "lb-clean loopback-openapi-v3-types*.tgz dist package api-docs", "verify": "npm pack && tar xf loopback-openapi-v3-types*.tgz && tree package && npm run clean", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/**/*.js\"", - "unit": "npm run build && lb-mocha \"dist/test/unit/**/*.js\"" + "test": "lb-mocha \"dist/__tests__/**/*.js\"", + "unit": "npm run build && lb-mocha \"dist/__tests__/unit/**/*.js\"" }, "author": "IBM", "copyright.owner": "IBM Corp.", @@ -35,9 +35,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "publishConfig": { "access": "public" diff --git a/packages/openapi-v3-types/test/unit/openapi-v3-spec-types.unit.ts b/packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts similarity index 100% rename from packages/openapi-v3-types/test/unit/openapi-v3-spec-types.unit.ts rename to packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts diff --git a/packages/openapi-v3-types/test/unit/type-guards.unit.ts b/packages/openapi-v3-types/src/__tests__/unit/type-guards.unit.ts similarity index 100% rename from packages/openapi-v3-types/test/unit/type-guards.unit.ts rename to packages/openapi-v3-types/src/__tests__/unit/type-guards.unit.ts diff --git a/packages/openapi-v3-types/tsconfig.build.json b/packages/openapi-v3-types/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/openapi-v3-types/tsconfig.build.json +++ b/packages/openapi-v3-types/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/openapi-v3/package.json b/packages/openapi-v3/package.json index 1abfa9557b56..226ef377b15e 100644 --- a/packages/openapi-v3/package.json +++ b/packages/openapi-v3/package.json @@ -19,10 +19,10 @@ "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-openapi-v3*.tgz dist package", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-openapi-v3*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -37,9 +37,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "publishConfig": { "access": "public" diff --git a/packages/openapi-v3/test/integration/controller-spec.integration.ts b/packages/openapi-v3/src/__tests__/integration/controller-spec.integration.ts similarity index 98% rename from packages/openapi-v3/test/integration/controller-spec.integration.ts rename to packages/openapi-v3/src/__tests__/integration/controller-spec.integration.ts index 54156cb42777..488aaccd0d7e 100644 --- a/packages/openapi-v3/test/integration/controller-spec.integration.ts +++ b/packages/openapi-v3/src/__tests__/integration/controller-spec.integration.ts @@ -3,11 +3,17 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {expect} from '@loopback/testlab'; -import {model, property} from '@loopback/repository'; import {ParameterObject, SchemaObject} from '@loopback/openapi-v3-types'; -import {param, requestBody, getControllerSpec, post, get} from '../../'; -import {ControllerSpec} from '../../src'; +import {model, property} from '@loopback/repository'; +import {expect} from '@loopback/testlab'; +import { + ControllerSpec, + get, + getControllerSpec, + param, + post, + requestBody, +} from '../..'; describe('controller spec', () => { it('adds property schemas in components.schemas', () => { diff --git a/packages/openapi-v3/test/integration/operation-spec.integration.ts b/packages/openapi-v3/src/__tests__/integration/operation-spec.integration.ts similarity index 100% rename from packages/openapi-v3/test/integration/operation-spec.integration.ts rename to packages/openapi-v3/src/__tests__/integration/operation-spec.integration.ts diff --git a/packages/openapi-v3/test/unit/decorators/operation.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/operation.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/operation.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/operation.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/param/param-header.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param-header.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/param/param-header.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/param/param-header.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/param/param-path.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param-path.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/param/param-path.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/param/param-path.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/param/param-query.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/param/param-query.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/param/param.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/param/param.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/request-body/request-body-primitives.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body-primitives.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/request-body/request-body-primitives.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body-primitives.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/decorators/request-body/request-body.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body.decorator.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/decorators/request-body/request-body.decorator.unit.ts rename to packages/openapi-v3/src/__tests__/unit/decorators/request-body/request-body.decorator.unit.ts diff --git a/packages/openapi-v3/test/unit/filter-schema.unit.ts b/packages/openapi-v3/src/__tests__/unit/filter-schema.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/filter-schema.unit.ts rename to packages/openapi-v3/src/__tests__/unit/filter-schema.unit.ts diff --git a/packages/openapi-v3/test/unit/generate-schema.unit.ts b/packages/openapi-v3/src/__tests__/unit/generate-schema.unit.ts similarity index 96% rename from packages/openapi-v3/test/unit/generate-schema.unit.ts rename to packages/openapi-v3/src/__tests__/unit/generate-schema.unit.ts index 4fad7b555edc..f601d0403d02 100644 --- a/packages/openapi-v3/test/unit/generate-schema.unit.ts +++ b/packages/openapi-v3/src/__tests__/unit/generate-schema.unit.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {resolveSchema} from '../../src/generate-schema'; +import {resolveSchema} from '../../generate-schema'; describe('generate-schema unit tests', () => { it('returns an empty object given no arguments', () => { diff --git a/packages/openapi-v3/test/unit/json-to-schema.unit.ts b/packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts similarity index 100% rename from packages/openapi-v3/test/unit/json-to-schema.unit.ts rename to packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts diff --git a/packages/openapi-v3/tsconfig.build.json b/packages/openapi-v3/tsconfig.build.json index b337b93a9838..6e15e4be4f6f 100644 --- a/packages/openapi-v3/tsconfig.build.json +++ b/packages/openapi-v3/tsconfig.build.json @@ -1,8 +1,8 @@ { - "$schema": "http://json.schemastore.org/tsconfig", - "extends": "@loopback/build/config/tsconfig.common.json", - "compilerOptions": { - "rootDir": "." - }, - "include": ["index.ts", "src", "test"] + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "@loopback/build/config/tsconfig.common.json", + "compilerOptions": { + "rootDir": "src" + }, + "include": ["src"] } diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index 0b5715758064..c9d3b7af9187 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -10,7 +10,7 @@ "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-json-schema*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\" \"dist/test/acceptance/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", "verify": "npm pack && tar xf loopback-json-schema*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -40,9 +40,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/repository-json-schema/test/integration/build-schema.integration.ts b/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts similarity index 100% rename from packages/repository-json-schema/test/integration/build-schema.integration.ts rename to packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts diff --git a/packages/repository-json-schema/test/unit/build-schema.unit.ts b/packages/repository-json-schema/src/__tests__/unit/build-schema.unit.ts similarity index 100% rename from packages/repository-json-schema/test/unit/build-schema.unit.ts rename to packages/repository-json-schema/src/__tests__/unit/build-schema.unit.ts diff --git a/packages/repository-json-schema/test/unit/filter-json-schema.unit.ts b/packages/repository-json-schema/src/__tests__/unit/filter-json-schema.unit.ts similarity index 99% rename from packages/repository-json-schema/test/unit/filter-json-schema.unit.ts rename to packages/repository-json-schema/src/__tests__/unit/filter-json-schema.unit.ts index a3093b7a6213..81045b64a221 100644 --- a/packages/repository-json-schema/test/unit/filter-json-schema.unit.ts +++ b/packages/repository-json-schema/src/__tests__/unit/filter-json-schema.unit.ts @@ -10,7 +10,7 @@ import {JsonSchema} from '../..'; import { getFilterJsonSchemaFor, getWhereJsonSchemaFor, -} from '../../src/filter-json-schema'; +} from '../../filter-json-schema'; describe('getFilterJsonSchemaFor', () => { let ajv: Ajv.Ajv; diff --git a/packages/repository-json-schema/test/unit/json-schema.unit.ts b/packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts similarity index 100% rename from packages/repository-json-schema/test/unit/json-schema.unit.ts rename to packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts diff --git a/packages/repository-json-schema/tsconfig.build.json b/packages/repository-json-schema/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/repository-json-schema/tsconfig.build.json +++ b/packages/repository-json-schema/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/repository/package.json b/packages/repository/package.json index ca6c78b07d88..0c16739c46b4 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -7,12 +7,12 @@ }, "main": "index", "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-repository*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/**/*.js\"", "verify": "npm pack && tar xf loopback-repository*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -37,9 +37,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/repository/test/acceptance/belongs-to.relation.acceptance.ts b/packages/repository/src/__tests__/acceptance/belongs-to.relation.acceptance.ts similarity index 100% rename from packages/repository/test/acceptance/belongs-to.relation.acceptance.ts rename to packages/repository/src/__tests__/acceptance/belongs-to.relation.acceptance.ts diff --git a/packages/repository/test/acceptance/has-many-without-di.relation.acceptance.ts b/packages/repository/src/__tests__/acceptance/has-many-without-di.relation.acceptance.ts similarity index 100% rename from packages/repository/test/acceptance/has-many-without-di.relation.acceptance.ts rename to packages/repository/src/__tests__/acceptance/has-many-without-di.relation.acceptance.ts diff --git a/packages/repository/test/acceptance/has-many.relation.acceptance.ts b/packages/repository/src/__tests__/acceptance/has-many.relation.acceptance.ts similarity index 100% rename from packages/repository/test/acceptance/has-many.relation.acceptance.ts rename to packages/repository/src/__tests__/acceptance/has-many.relation.acceptance.ts diff --git a/packages/repository/test/acceptance/has-one.relation.acceptance.ts b/packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts similarity index 100% rename from packages/repository/test/acceptance/has-one.relation.acceptance.ts rename to packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts diff --git a/packages/repository/test/acceptance/repository.acceptance.ts b/packages/repository/src/__tests__/acceptance/repository.acceptance.ts similarity index 100% rename from packages/repository/test/acceptance/repository.acceptance.ts rename to packages/repository/src/__tests__/acceptance/repository.acceptance.ts diff --git a/packages/repository/test/fixtures/models/address.model.ts b/packages/repository/src/__tests__/fixtures/models/address.model.ts similarity index 100% rename from packages/repository/test/fixtures/models/address.model.ts rename to packages/repository/src/__tests__/fixtures/models/address.model.ts diff --git a/packages/repository/test/fixtures/models/customer.model.ts b/packages/repository/src/__tests__/fixtures/models/customer.model.ts similarity index 100% rename from packages/repository/test/fixtures/models/customer.model.ts rename to packages/repository/src/__tests__/fixtures/models/customer.model.ts diff --git a/packages/repository/test/fixtures/models/index.ts b/packages/repository/src/__tests__/fixtures/models/index.ts similarity index 100% rename from packages/repository/test/fixtures/models/index.ts rename to packages/repository/src/__tests__/fixtures/models/index.ts diff --git a/packages/repository/test/fixtures/models/order.model.ts b/packages/repository/src/__tests__/fixtures/models/order.model.ts similarity index 100% rename from packages/repository/test/fixtures/models/order.model.ts rename to packages/repository/src/__tests__/fixtures/models/order.model.ts diff --git a/packages/repository/test/fixtures/models/product.model.ts b/packages/repository/src/__tests__/fixtures/models/product.model.ts similarity index 100% rename from packages/repository/test/fixtures/models/product.model.ts rename to packages/repository/src/__tests__/fixtures/models/product.model.ts diff --git a/packages/repository/test/fixtures/repositories/address.repository.ts b/packages/repository/src/__tests__/fixtures/repositories/address.repository.ts similarity index 100% rename from packages/repository/test/fixtures/repositories/address.repository.ts rename to packages/repository/src/__tests__/fixtures/repositories/address.repository.ts diff --git a/packages/repository/test/fixtures/repositories/customer.repository.ts b/packages/repository/src/__tests__/fixtures/repositories/customer.repository.ts similarity index 100% rename from packages/repository/test/fixtures/repositories/customer.repository.ts rename to packages/repository/src/__tests__/fixtures/repositories/customer.repository.ts diff --git a/packages/repository/test/fixtures/repositories/index.ts b/packages/repository/src/__tests__/fixtures/repositories/index.ts similarity index 100% rename from packages/repository/test/fixtures/repositories/index.ts rename to packages/repository/src/__tests__/fixtures/repositories/index.ts diff --git a/packages/repository/test/fixtures/repositories/order.repository.ts b/packages/repository/src/__tests__/fixtures/repositories/order.repository.ts similarity index 100% rename from packages/repository/test/fixtures/repositories/order.repository.ts rename to packages/repository/src/__tests__/fixtures/repositories/order.repository.ts diff --git a/packages/repository/test/fixtures/repositories/product.repository.ts b/packages/repository/src/__tests__/fixtures/repositories/product.repository.ts similarity index 100% rename from packages/repository/test/fixtures/repositories/product.repository.ts rename to packages/repository/src/__tests__/fixtures/repositories/product.repository.ts diff --git a/packages/repository/test/integration/repositories/relation.factory.integration.ts b/packages/repository/src/__tests__/integration/repositories/relation.factory.integration.ts similarity index 100% rename from packages/repository/test/integration/repositories/relation.factory.integration.ts rename to packages/repository/src/__tests__/integration/repositories/relation.factory.integration.ts diff --git a/packages/repository/test/unit/decorator/metadata.unit.ts b/packages/repository/src/__tests__/unit/decorator/metadata.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/metadata.unit.ts rename to packages/repository/src/__tests__/unit/decorator/metadata.unit.ts diff --git a/packages/repository/test/unit/decorator/model-and-relation.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/model-and-relation.decorator.unit.ts rename to packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts diff --git a/packages/repository/test/unit/decorator/relation.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/relation.decorator.unit.ts rename to packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts diff --git a/packages/repository/test/unit/decorator/repository-with-di.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/repository-with-di.decorator.unit.ts rename to packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts diff --git a/packages/repository/test/unit/decorator/repository-with-value-provider.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/repository-with-value-provider.decorator.unit.ts rename to packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts diff --git a/packages/repository/test/unit/decorator/repository.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts similarity index 100% rename from packages/repository/test/unit/decorator/repository.decorator.unit.ts rename to packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts diff --git a/packages/repository/test/unit/errors/entity-not-found-error.test.ts b/packages/repository/src/__tests__/unit/errors/entity-not-found-error.test.ts similarity index 100% rename from packages/repository/test/unit/errors/entity-not-found-error.test.ts rename to packages/repository/src/__tests__/unit/errors/entity-not-found-error.test.ts diff --git a/packages/repository/test/unit/errors/invalid-relation-error.test.ts b/packages/repository/src/__tests__/unit/errors/invalid-relation-error.test.ts similarity index 100% rename from packages/repository/test/unit/errors/invalid-relation-error.test.ts rename to packages/repository/src/__tests__/unit/errors/invalid-relation-error.test.ts diff --git a/packages/repository/test/unit/mixins/repository.mixin.unit.ts b/packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts similarity index 100% rename from packages/repository/test/unit/mixins/repository.mixin.unit.ts rename to packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts diff --git a/packages/repository/test/unit/model/model.unit.ts b/packages/repository/src/__tests__/unit/model/model.unit.ts similarity index 100% rename from packages/repository/test/unit/model/model.unit.ts rename to packages/repository/src/__tests__/unit/model/model.unit.ts diff --git a/packages/repository/test/unit/query/query-builder.unit.ts b/packages/repository/src/__tests__/unit/query/query-builder.unit.ts similarity index 100% rename from packages/repository/test/unit/query/query-builder.unit.ts rename to packages/repository/src/__tests__/unit/query/query-builder.unit.ts diff --git a/packages/repository/test/unit/repositories/belongs-to-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/belongs-to-repository-factory.unit.ts rename to packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts diff --git a/packages/repository/test/unit/repositories/constraint-utils.unit.ts b/packages/repository/src/__tests__/unit/repositories/constraint-utils.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/constraint-utils.unit.ts rename to packages/repository/src/__tests__/unit/repositories/constraint-utils.unit.ts diff --git a/packages/repository/test/unit/repositories/crud.repository.unit.ts b/packages/repository/src/__tests__/unit/repositories/crud.repository.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/crud.repository.unit.ts rename to packages/repository/src/__tests__/unit/repositories/crud.repository.unit.ts diff --git a/packages/repository/test/unit/repositories/has-many-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/has-many-repository-factory.unit.ts rename to packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts diff --git a/packages/repository/test/unit/repositories/has-one-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/has-one-repository-factory.unit.ts rename to packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts diff --git a/packages/repository/test/unit/repositories/kv.repository.bridge.unit.ts b/packages/repository/src/__tests__/unit/repositories/kv.repository.bridge.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/kv.repository.bridge.unit.ts rename to packages/repository/src/__tests__/unit/repositories/kv.repository.bridge.unit.ts diff --git a/packages/repository/test/unit/repositories/legacy-juggler-bridge.unit.ts b/packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/legacy-juggler-bridge.unit.ts rename to packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts diff --git a/packages/repository/test/unit/repositories/relation.repository.unit.ts b/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts similarity index 100% rename from packages/repository/test/unit/repositories/relation.repository.unit.ts rename to packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts diff --git a/packages/repository/test/unit/type-resolver.unit.ts b/packages/repository/src/__tests__/unit/type-resolver.unit.ts similarity index 97% rename from packages/repository/test/unit/type-resolver.unit.ts rename to packages/repository/src/__tests__/unit/type-resolver.unit.ts index c395c2b8d30a..f3d8afc6dca6 100644 --- a/packages/repository/test/unit/type-resolver.unit.ts +++ b/packages/repository/src/__tests__/unit/type-resolver.unit.ts @@ -4,11 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import { - isBuiltinType, - isTypeResolver, - resolveType, -} from '../../src/type-resolver'; +import {isBuiltinType, isTypeResolver, resolveType} from '../../type-resolver'; class SomeModel { constructor(public name: string) {} diff --git a/packages/repository/test/unit/type/type.unit.ts b/packages/repository/src/__tests__/unit/type/type.unit.ts similarity index 100% rename from packages/repository/test/unit/type/type.unit.ts rename to packages/repository/src/__tests__/unit/type/type.unit.ts diff --git a/packages/repository/tsconfig.build.json b/packages/repository/tsconfig.build.json index 2364eca7dfb4..6e15e4be4f6f 100644 --- a/packages/repository/tsconfig.build.json +++ b/packages/repository/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test", "examples"] + "include": ["src"] } diff --git a/packages/rest-explorer/package.json b/packages/rest-explorer/package.json index f85c034f2ad4..8500151ae70a 100644 --- a/packages/rest-explorer/package.json +++ b/packages/rest-explorer/package.json @@ -10,7 +10,7 @@ "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-explorer*.tgz dist package api-docs", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/**/*.js\"", "verify": "npm pack && tar xf loopback-explorer*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -39,9 +39,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", + "dist", "src", + "!*/__tests__", "templates" ], "publishConfig": { diff --git a/packages/rest-explorer/test/acceptance/rest-explorer.acceptance.ts b/packages/rest-explorer/src/__tests__/acceptance/rest-explorer.acceptance.ts similarity index 100% rename from packages/rest-explorer/test/acceptance/rest-explorer.acceptance.ts rename to packages/rest-explorer/src/__tests__/acceptance/rest-explorer.acceptance.ts diff --git a/packages/rest-explorer/src/rest-explorer.controller.ts b/packages/rest-explorer/src/rest-explorer.controller.ts index 19d52dbf5f99..85dac4796852 100644 --- a/packages/rest-explorer/src/rest-explorer.controller.ts +++ b/packages/rest-explorer/src/rest-explorer.controller.ts @@ -16,7 +16,7 @@ import * as fs from 'fs'; import * as path from 'path'; // TODO(bajtos) Allow users to customize the template -const indexHtml = path.resolve(__dirname, '../../templates/index.html.ejs'); +const indexHtml = path.resolve(__dirname, '../templates/index.html.ejs'); const template = fs.readFileSync(indexHtml, 'utf-8'); const templateFn = ejs.compile(template); diff --git a/packages/rest-explorer/tsconfig.build.json b/packages/rest-explorer/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/rest-explorer/tsconfig.build.json +++ b/packages/rest-explorer/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/rest/package.json b/packages/rest/package.json index 06e5d380ba1a..f0ea8dea897e 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -6,14 +6,14 @@ "node": ">=8.9" }, "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-rest*.tgz dist package api-docs", "pretest": "npm run build", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\" \"dist/test/acceptance/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/integration/**/*.js\" \"dist/__tests__/acceptance/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-rest*.tgz && tree package && npm run clean" }, "author": "IBM", @@ -66,9 +66,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/rest/test/acceptance/bootstrapping/rest.acceptance.ts b/packages/rest/src/__tests__/acceptance/bootstrapping/rest.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/bootstrapping/rest.acceptance.ts rename to packages/rest/src/__tests__/acceptance/bootstrapping/rest.acceptance.ts diff --git a/packages/rest/test/acceptance/coercion/coercion.acceptance.ts b/packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/coercion/coercion.acceptance.ts rename to packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts diff --git a/packages/rest/test/acceptance/file-upload/file-upload-with-parser.acceptance.ts b/packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/file-upload/file-upload-with-parser.acceptance.ts rename to packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts diff --git a/packages/rest/test/acceptance/file-upload/file-upload.acceptance.ts b/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/file-upload/file-upload.acceptance.ts rename to packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts diff --git a/packages/rest/test/acceptance/module-exporting/feature.md b/packages/rest/src/__tests__/acceptance/module-exporting/feature.md similarity index 100% rename from packages/rest/test/acceptance/module-exporting/feature.md rename to packages/rest/src/__tests__/acceptance/module-exporting/feature.md diff --git a/packages/rest/test/acceptance/request-parsing/request-parsing.acceptance.ts b/packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/request-parsing/request-parsing.acceptance.ts rename to packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts diff --git a/packages/rest/test/acceptance/routing/feature.md b/packages/rest/src/__tests__/acceptance/routing/feature.md similarity index 100% rename from packages/rest/test/acceptance/routing/feature.md rename to packages/rest/src/__tests__/acceptance/routing/feature.md diff --git a/packages/rest/test/acceptance/routing/routing.acceptance.ts b/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/routing/routing.acceptance.ts rename to packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts diff --git a/packages/rest/test/acceptance/sequence/sequence.acceptance.ts b/packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/sequence/sequence.acceptance.ts rename to packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts diff --git a/packages/rest/test/acceptance/validation/validation.acceptance.ts b/packages/rest/src/__tests__/acceptance/validation/validation.acceptance.ts similarity index 100% rename from packages/rest/test/acceptance/validation/validation.acceptance.ts rename to packages/rest/src/__tests__/acceptance/validation/validation.acceptance.ts diff --git a/packages/rest/test/helpers.ts b/packages/rest/src/__tests__/helpers.ts similarity index 100% rename from packages/rest/test/helpers.ts rename to packages/rest/src/__tests__/helpers.ts diff --git a/packages/rest/test/integration/http-handler.integration.ts b/packages/rest/src/__tests__/integration/http-handler.integration.ts similarity index 100% rename from packages/rest/test/integration/http-handler.integration.ts rename to packages/rest/src/__tests__/integration/http-handler.integration.ts diff --git a/packages/rest/test/integration/rest.application.integration.ts b/packages/rest/src/__tests__/integration/rest.application.integration.ts similarity index 100% rename from packages/rest/test/integration/rest.application.integration.ts rename to packages/rest/src/__tests__/integration/rest.application.integration.ts diff --git a/packages/rest/test/integration/rest.server.integration.ts b/packages/rest/src/__tests__/integration/rest.server.integration.ts similarity index 100% rename from packages/rest/test/integration/rest.server.integration.ts rename to packages/rest/src/__tests__/integration/rest.server.integration.ts diff --git a/packages/rest/test/unit/body-parser.unit.ts b/packages/rest/src/__tests__/unit/body-parser.unit.ts similarity index 99% rename from packages/rest/test/unit/body-parser.unit.ts rename to packages/rest/src/__tests__/unit/body-parser.unit.ts index 8d760c1610dc..706040be2d6d 100644 --- a/packages/rest/test/unit/body-parser.unit.ts +++ b/packages/rest/src/__tests__/unit/body-parser.unit.ts @@ -21,7 +21,7 @@ import { TextBodyParser, UrlEncodedBodyParser, } from '../..'; -import {builtinParsers} from '../../src/body-parsers/body-parser.helpers'; +import {builtinParsers} from '../../body-parsers/body-parser.helpers'; describe('body parser', () => { const defaultSchema = { diff --git a/packages/rest/test/unit/coercion/invalid-spec.unit.test.ts b/packages/rest/src/__tests__/unit/coercion/invalid-spec.unit.test.ts similarity index 100% rename from packages/rest/test/unit/coercion/invalid-spec.unit.test.ts rename to packages/rest/src/__tests__/unit/coercion/invalid-spec.unit.test.ts diff --git a/packages/rest/test/unit/coercion/paramObject.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramObject.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramObject.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramObject.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToBoolean.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToBoolean.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToBoolean.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToBoolean.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToBuffer.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToBuffer.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToBuffer.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToBuffer.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToDate.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToDate.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToDate.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToDate.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToInteger.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToInteger.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToInteger.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToInteger.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToNumber.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToNumber.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToNumber.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToNumber.unit.ts diff --git a/packages/rest/test/unit/coercion/paramStringToString.unit.ts b/packages/rest/src/__tests__/unit/coercion/paramStringToString.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/paramStringToString.unit.ts rename to packages/rest/src/__tests__/unit/coercion/paramStringToString.unit.ts diff --git a/packages/rest/test/unit/coercion/parseStringToDatetime.unit.ts b/packages/rest/src/__tests__/unit/coercion/parseStringToDatetime.unit.ts similarity index 100% rename from packages/rest/test/unit/coercion/parseStringToDatetime.unit.ts rename to packages/rest/src/__tests__/unit/coercion/parseStringToDatetime.unit.ts diff --git a/packages/rest/test/unit/coercion/utils.ts b/packages/rest/src/__tests__/unit/coercion/utils.ts similarity index 100% rename from packages/rest/test/unit/coercion/utils.ts rename to packages/rest/src/__tests__/unit/coercion/utils.ts diff --git a/packages/rest/test/unit/parser.unit.ts b/packages/rest/src/__tests__/unit/parser.unit.ts similarity index 100% rename from packages/rest/test/unit/parser.unit.ts rename to packages/rest/src/__tests__/unit/parser.unit.ts diff --git a/packages/rest/test/unit/re-export.unit.ts b/packages/rest/src/__tests__/unit/re-export.unit.ts similarity index 100% rename from packages/rest/test/unit/re-export.unit.ts rename to packages/rest/src/__tests__/unit/re-export.unit.ts diff --git a/packages/rest/test/unit/request-body.validator.test.ts b/packages/rest/src/__tests__/unit/request-body.validator.test.ts similarity index 99% rename from packages/rest/test/unit/request-body.validator.test.ts rename to packages/rest/src/__tests__/unit/request-body.validator.test.ts index 73817c3489ab..7058e09abb2b 100644 --- a/packages/rest/test/unit/request-body.validator.test.ts +++ b/packages/rest/src/__tests__/unit/request-body.validator.test.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {validateRequestBody} from '../../src/validation/request-body.validator'; +import {validateRequestBody} from '../../validation/request-body.validator'; import {RestHttpErrors} from '../../'; import {aBodySpec} from '../helpers'; import { diff --git a/packages/rest/test/unit/rest.application/rest.application.unit.ts b/packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts similarity index 100% rename from packages/rest/test/unit/rest.application/rest.application.unit.ts rename to packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts diff --git a/packages/rest/test/unit/rest.component.unit.ts b/packages/rest/src/__tests__/unit/rest.component.unit.ts similarity index 100% rename from packages/rest/test/unit/rest.component.unit.ts rename to packages/rest/src/__tests__/unit/rest.component.unit.ts diff --git a/packages/rest/test/unit/rest.server/rest.server.controller.unit.ts b/packages/rest/src/__tests__/unit/rest.server/rest.server.controller.unit.ts similarity index 100% rename from packages/rest/test/unit/rest.server/rest.server.controller.unit.ts rename to packages/rest/src/__tests__/unit/rest.server/rest.server.controller.unit.ts diff --git a/packages/rest/test/unit/rest.server/rest.server.open-api-spec.unit.ts b/packages/rest/src/__tests__/unit/rest.server/rest.server.open-api-spec.unit.ts similarity index 100% rename from packages/rest/test/unit/rest.server/rest.server.open-api-spec.unit.ts rename to packages/rest/src/__tests__/unit/rest.server/rest.server.open-api-spec.unit.ts diff --git a/packages/rest/test/unit/rest.server/rest.server.unit.ts b/packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts similarity index 100% rename from packages/rest/test/unit/rest.server/rest.server.unit.ts rename to packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts diff --git a/packages/rest/test/unit/router/controller-factory.unit.ts b/packages/rest/src/__tests__/unit/router/controller-factory.unit.ts similarity index 100% rename from packages/rest/test/unit/router/controller-factory.unit.ts rename to packages/rest/src/__tests__/unit/router/controller-factory.unit.ts diff --git a/packages/rest/test/unit/router/controller-route.unit.ts b/packages/rest/src/__tests__/unit/router/controller-route.unit.ts similarity index 100% rename from packages/rest/test/unit/router/controller-route.unit.ts rename to packages/rest/src/__tests__/unit/router/controller-route.unit.ts diff --git a/packages/rest/test/unit/router/openapi-path.unit.ts b/packages/rest/src/__tests__/unit/router/openapi-path.unit.ts similarity index 100% rename from packages/rest/test/unit/router/openapi-path.unit.ts rename to packages/rest/src/__tests__/unit/router/openapi-path.unit.ts diff --git a/packages/rest/test/unit/router/reject.provider.unit.ts b/packages/rest/src/__tests__/unit/router/reject.provider.unit.ts similarity index 100% rename from packages/rest/test/unit/router/reject.provider.unit.ts rename to packages/rest/src/__tests__/unit/router/reject.provider.unit.ts diff --git a/packages/rest/test/unit/router/route-sort.unit.ts b/packages/rest/src/__tests__/unit/router/route-sort.unit.ts similarity index 100% rename from packages/rest/test/unit/router/route-sort.unit.ts rename to packages/rest/src/__tests__/unit/router/route-sort.unit.ts diff --git a/packages/rest/test/unit/router/routing-table.unit.ts b/packages/rest/src/__tests__/unit/router/routing-table.unit.ts similarity index 100% rename from packages/rest/test/unit/router/routing-table.unit.ts rename to packages/rest/src/__tests__/unit/router/routing-table.unit.ts diff --git a/packages/rest/test/unit/router/trie-router.unit.ts b/packages/rest/src/__tests__/unit/router/trie-router.unit.ts similarity index 98% rename from packages/rest/test/unit/router/trie-router.unit.ts rename to packages/rest/src/__tests__/unit/router/trie-router.unit.ts index e592ca46cdae..ae02e14cdda0 100644 --- a/packages/rest/test/unit/router/trie-router.unit.ts +++ b/packages/rest/src/__tests__/unit/router/trie-router.unit.ts @@ -3,14 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT +import {anOperationSpec} from '@loopback/openapi-spec-builder'; import { expect, ShotRequestOptions, stubExpressContext, } from '@loopback/testlab'; -import {TrieRouter, RouteEntry, Request} from '../../..'; -import {anOperationSpec} from '@loopback/openapi-spec-builder'; -import {ResolvedRoute} from '../../../src'; +import {Request, ResolvedRoute, RouteEntry, TrieRouter} from '../../..'; class TestTrieRouter extends TrieRouter { get staticRoutes() { diff --git a/packages/rest/test/unit/router/trie.unit.ts b/packages/rest/src/__tests__/unit/router/trie.unit.ts similarity index 100% rename from packages/rest/test/unit/router/trie.unit.ts rename to packages/rest/src/__tests__/unit/router/trie.unit.ts diff --git a/packages/rest/test/unit/writer.unit.ts b/packages/rest/src/__tests__/unit/writer.unit.ts similarity index 100% rename from packages/rest/test/unit/writer.unit.ts rename to packages/rest/src/__tests__/unit/writer.unit.ts diff --git a/packages/rest/tsconfig.build.json b/packages/rest/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/rest/tsconfig.build.json +++ b/packages/rest/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] } diff --git a/packages/service-proxy/package.json b/packages/service-proxy/package.json index 5fe3914a2303..6ad64b0f092f 100644 --- a/packages/service-proxy/package.json +++ b/packages/service-proxy/package.json @@ -7,14 +7,14 @@ }, "main": "index", "scripts": { - "acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"", + "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build:apidocs": "lb-apidocs", "build": "lb-tsc es2017 --outDir dist", "clean": "lb-clean loopback-service-proxy*.tgz dist package api-docs", - "integration": "lb-mocha \"dist/test/integration/**/*.js\"", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", "pretest": "npm run build", - "test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/acceptance/**/*.js\" \"dist/test/integration/**/*.js\"", - "unit": "lb-mocha \"dist/test/unit/**/*.js\"", + "test": "lb-mocha \"dist/__tests__/unit/**/*.js\" \"dist/__tests__/acceptance/**/*.js\" \"dist/__tests__/integration/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-service-proxy*.tgz && tree package && npm run clean" }, "publishConfig": { @@ -38,9 +38,9 @@ "README.md", "index.js", "index.d.ts", - "dist/src", - "dist/index*", - "src" + "dist", + "src", + "!*/__tests__" ], "repository": { "type": "git", diff --git a/packages/service-proxy/test/integration/service-proxy.integration.ts b/packages/service-proxy/src/__tests__/integration/service-proxy.integration.ts similarity index 100% rename from packages/service-proxy/test/integration/service-proxy.integration.ts rename to packages/service-proxy/src/__tests__/integration/service-proxy.integration.ts diff --git a/packages/service-proxy/test/mock-service.connector.ts b/packages/service-proxy/src/__tests__/mock-service.connector.ts similarity index 100% rename from packages/service-proxy/test/mock-service.connector.ts rename to packages/service-proxy/src/__tests__/mock-service.connector.ts diff --git a/packages/service-proxy/test/unit/decorators/service-proxy.decorator.unit.ts b/packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts similarity index 100% rename from packages/service-proxy/test/unit/decorators/service-proxy.decorator.unit.ts rename to packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts diff --git a/packages/service-proxy/test/unit/mixin/service.mixin.unit.ts b/packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts similarity index 100% rename from packages/service-proxy/test/unit/mixin/service.mixin.unit.ts rename to packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts diff --git a/packages/service-proxy/tsconfig.build.json b/packages/service-proxy/tsconfig.build.json index f8bd0f50ef8f..6e15e4be4f6f 100644 --- a/packages/service-proxy/tsconfig.build.json +++ b/packages/service-proxy/tsconfig.build.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "compilerOptions": { - "rootDir": "." + "rootDir": "src" }, - "include": ["index.ts", "src", "test"] + "include": ["src"] }