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 4, 2024
1 parent 2af44d2 commit bf5a87e
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 311 deletions.
43 changes: 0 additions & 43 deletions Package.resolved

This file was deleted.

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 bf5a87e

Please sign in to comment.