Skip to content

chore: e2e to work with virtual registry [skip ci] #583

chore: e2e to work with virtual registry [skip ci]

chore: e2e to work with virtual registry [skip ci] #583

GitHub Actions / Tests Results (core) succeeded Jan 20, 2024 in 1s

Tests Results (core) ✅

Tests passed successfully

✅ /home/runner/work/automock/automock/test-reports/core.xml

29 tests were completed in 2s with 29 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Automock Adapter Package Resolving Integration Test 2✅ 139ms
Builder Integration Test 12✅ 1s
Mocks Container Unit Spec 5✅ 1s
Unit Mocker Unit Spec 3✅ 1s
Unit Reference Unit Spec 7✅ 142ms

✅ Automock Adapter Package Resolving Integration Test

Automock Adapter Package Resolving Integration Test Resolving an adapter with default export should successfully resolve the adapter package
  ✅ Automock Adapter Package Resolving Integration Test Resolving an adapter with default export should successfully resolve the adapter package
Automock Adapter Package Resolving Integration Test Resolving an adapter with no default export should failed resolving the adapter package and throw an error
  ✅ Automock Adapter Package Resolving Integration Test Resolving an adapter with no default export should failed resolving the adapter package and throw an error

✅ Builder Integration Test

Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassOne", with metadata undefined mocked from Symbol(MockFromMocker)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassOne", with metadata undefined mocked from Symbol(MockFromMocker)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassTwo", with metadata undefined mocked from Symbol(MockedFromBuilder)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassTwo", with metadata undefined mocked from Symbol(MockedFromBuilder)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassFive", with metadata undefined mocked from Symbol(MockFromMocker)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassFive", with metadata undefined mocked from Symbol(MockFromMocker)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassFive", with metadata undefined mocked from Symbol(MockFromMocker)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom string-based token with metadata", with metadata {"metadataKey": "value"} mocked from Symbol(MockFromMocker)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom string-based token with metadata", with metadata {"metadataKey": "value"} mocked from Symbol(MockFromMocker)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassFour", with metadata undefined mocked from Symbol(MockedFromBuilder)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "ArbitraryClassFour", with metadata undefined mocked from Symbol(MockedFromBuilder)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom string-based token with function", with metadata undefined mocked from Symbol(MockedFromBuilder)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom string-based token with function", with metadata undefined mocked from Symbol(MockedFromBuilder)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom token with undefined value", with metadata undefined mocked from "SOME_VALUE"
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom token with undefined value", with metadata undefined mocked from "SOME_VALUE"
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom symbol-based token", with metadata {"key": "value"} mocked from Symbol(MockedFromBuilder)
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom symbol-based token", with metadata {"key": "value"} mocked from Symbol(MockedFromBuilder)
Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom token with constant value", with metadata undefined mocked from "ARBITRARY_STRING"
  ✅ Builder Integration Test creating a testbed builder with some mock overrides override the dependencies from the builder, and leave the rest for the dependencies mocked should return a mock or a value for "custom token with constant value", with metadata undefined mocked from "ARBITRARY_STRING"
Builder Integration Test creating a testbed builder with some mock overrides should return an instance of the unit and a unit reference
  ✅ Builder Integration Test creating a testbed builder with some mock overrides should return an instance of the unit and a unit reference
Builder Integration Test creating a testbed builder with some mock overrides should log a warning indicating the dependency was not found when mocking missing dependency
  ✅ Builder Integration Test creating a testbed builder with some mock overrides should log a warning indicating the dependency was not found when mocking missing dependency

✅ Mocks Container Unit Spec

Mocks Container Unit Spec should return the corresponding value when the identifier matches a single identifier and metadata is not provided
  ✅ Mocks Container Unit Spec should return the corresponding value when the identifier matches a single identifier and metadata is not provided
Mocks Container Unit Spec should return the value of the first matching identifier when the identifier matches multiple identifiers and metadata is not provided
  ✅ Mocks Container Unit Spec should return the value of the first matching identifier when the identifier matches multiple identifiers and metadata is not provided
Mocks Container Unit Spec should return undefined when the identifier does not match any identifier
  ✅ Mocks Container Unit Spec should return undefined when the identifier does not match any identifier
Mocks Container Unit Spec should return undefined when the identifier matches a single identifier but metadata does not match
  ✅ Mocks Container Unit Spec should return undefined when the identifier matches a single identifier but metadata does not match
Mocks Container Unit Spec should return undefined when the identifier matches multiple identifiers but metadata does not match any of them
  ✅ Mocks Container Unit Spec should return undefined when the identifier matches multiple identifiers but metadata does not match any of them

✅ Unit Mocker Unit Spec

Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should return container that lists all the dependencies together, mocked from the builder or from advanced
  ✅ Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should return container that lists all the dependencies together, mocked from the builder or from advanced
Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should return an instance of the class as the unit
  ✅ Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should return an instance of the class as the unit
Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should apply the mocks to the class properties as well
  ✅ Unit Mocker Unit Spec given that the adapter returns container with the following dependencies and given there are some already mocked injectables from advanced in the mocks container when applying all the mocks on the target unit, including the already mocked should apply the mocks to the class properties as well

✅ Unit Reference Unit Spec

Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with no metadata
Unit Reference Unit Spec should return the corresponding class or value using unique identifier with metadata combined
  ✅ Unit Reference Unit Spec should return the corresponding class or value using unique identifier with metadata combined
Unit Reference Unit Spec should throw an error indicating the dependency not found in case the identifier is missing
  ✅ Unit Reference Unit Spec should throw an error indicating the dependency not found in case the identifier is missing