Skip to content

Commit

Permalink
refactor(tests): use Swift Testing instead of Quick and Nimble
Browse files Browse the repository at this point in the history
  • Loading branch information
hadiidbouk committed Nov 1, 2024
1 parent 2af44d2 commit 0a0117e
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 308 deletions.
61 changes: 21 additions & 40 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version": "2.1.1"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version": "2.1.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "c93f16c25af5770f0d3e6af27c9634640946b068",
"version": "9.2.1"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "bd86ca0141e3cfb333546de5a11ede63f0c4a0e6",
"version": "4.0.0"
}
"originHash" : "ede22b050768f52791700f5180a4aa61895bb35c736831fcd8e92b47ed2b2418",
"pins" : [
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-docc-plugin",
"state" : {
"revision" : "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64",
"version" : "1.4.3"
}
]
},
"version": 1
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-docc-symbolkit",
"state" : {
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
"version" : "1.0.0"
}
}
],
"version" : 3
}
4 changes: 0 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/Quick/Quick.git", from: "4.0.0"),
.package(url: "https://github.com/Quick/Nimble.git", from: "9.0.0"),
],
targets: [
.target(
Expand Down Expand Up @@ -53,8 +51,6 @@ let package = Package(
name: "FueledUtilsCombineTests",
dependencies: [
"FueledUtilsCombine",
"Quick",
"Nimble",
],
path: "Tests/FueledUtils/CombineTests"
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2020 Fueled Digital Media, LLC
// Copyright © 2024 Fueled Digital Media, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,23 +15,20 @@
@testable import FueledUtilsCombine

import Combine
import Quick
import Nimble
import Testing

class AnyCurrentValuePublisherSpec: QuickSpec {
override func spec() {
describe("AnyCurrentValuePublisherSpec") {
describe("Initialization") {
it("Should initialize with a stored value") {
let publisher = AnyCurrentValuePublisher<Int, Never>(1)
expect(publisher.value) == 1
}
it("Should initialize with a nested CurrentValueSubject") {
let subject = CurrentValueSubject<Int, Never>(2)
let publisher = AnyCurrentValuePublisher(subject)
expect(publisher.value) == 2
}
}
}
@Suite("AnyCurrentValuePluisher Initialization")
struct AnyCurrentValuePublisherTests {
@Test("Should initialize with a stored value")
func withAStoredValue() {
let publisher = AnyCurrentValuePublisher<Int, Never>(1)
#expect(publisher.value == 1)
}

@Test("Should initialize with a nested CurrentValueSubject")
func withNestedCurrentValueSubject() {
let subject = CurrentValueSubject<Int, Never>(2)
let publisher = AnyCurrentValuePublisher(subject)
#expect(publisher.value == 2)
}
}
194 changes: 0 additions & 194 deletions Tests/FueledUtils/CombineTests/CombineLatestManySpec.swift

This file was deleted.

Loading

0 comments on commit 0a0117e

Please sign in to comment.