Commit Graph
6 Commits
Author SHA1 Message Date
NachoSoto b798114567 Refactor: extracted Collection.subscript(safe:) (#2779)
This is useful to have in extensions and not just in this test.
2023-07-11 10:22:19 -07:00
NachoSoto 0cadce9fb3 Add Sequence<AdditiveArithmetic>.sum() (#2694) 2023-06-23 07:35:03 -07:00
NachoSoto 7b3b03d2b3 Xcode 14.3: fixed compilation errors (#2399)
See also #2397.
Xcode 14.3 introduced the following error:
> Heterogeneous collection literal could only be inferred to '[String :
Any]'; add explicit type annotation if this is intentional

### Changes:
- Added explicit types to fix this new error
- Removed unnecessary `@preconcurrency` imports
- Added new `CustomerInfo.emptyInfo` to reduce duplication of same fake
`CustomerInfo` creation
2023-04-11 08:55:21 -07:00
NachoSoto 5c01aa37dd Added Collection.onlyElement (#1857)
Simplifies the common pattern in tests:
```swift
expect(array).to(haveCount(1))
let element = try XCTUnwrap(array.first)
```

Into simply:
```swift
let element = try XCTUnwrap(array.onlyElement)
```
2022-08-22 16:00:39 -07:00
NachoSoto c987f10266 Created TestCase superclass to allow re-generating snapshots (#1559)
## Motivation:

There is no way to run code statically like in Obj-C using `+ [NSObject initialize]`, so this ensures (through a new `SwiftLint` rule) that all test classes inherit this common test class instead of `XCTestCase` directly.
A future PR will make use of this new `CIRCLECI_TESTS_GENERATE_SNAPSHOTS` environment variable to allow regenerating snapshots in CI.

I've also moved the duplicated `CurrentTestCaseTracker` usages to a single point.
2022-05-10 12:40:40 -07:00
aboedo d1ddd6bf9c Clean up tests folders (#1402)
* moved test suites to Tests folder

* fixed outdated path

* fixed more outdated paths

* moved TestsPlans to Tests folder

* update path to Constants.swift
2022-03-21 10:26:00 -03:00