-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Reducer Protocol] - Add New Test Cases #68
[Reducer Protocol] - Add New Test Cases #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other than that, LGTM 🚀
@@ -1,5 +1,6 @@ | |||
import RxSwift | |||
import XCTest | |||
import Combine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected to import combine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wkwkwk, just trying things with Combine Effect this morning, please remove this dik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah my bad guys 🤣 removed on next commit yaa
internal func testStateAccess_useNewScope() async { | ||
enum Action { case a, b, c, d } | ||
|
||
let store = TestStore( | ||
initialState: 0, | ||
reducer: Reduce<Int, Action>({ count, action in | ||
switch action { | ||
case .a: | ||
count += 1 | ||
return .merge(.init(value: .b), .init(value: .c), .init(value: .d)) | ||
case .b, .c, .d: | ||
count += 1 | ||
return .none | ||
} | ||
}), | ||
useNewScope: true | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think better to create separate file for oldScope dik, and for this file, use newScope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, we can do that @jeffersonsetiawan on next commit ya
…posableArchitecture into feature/poc-update-test
* add dependencies and its test * update effect and reducer * add reducers, rename anyreducer, delete xct related files * extract storeconfig * task result and task cancellable value * observable * effect * fix package swift * any disposable * import xctdynamicoverlay * update effects * make any disposable public * fix any reducer compatibility * first passed test 5.7 * refactor package.swift * remove anyequatable double * update store * wrap in discardable * [TestStore] - Update to conform changes ReducerProtocol (#65) * progress update teststore * progressing update TestStore * Fixing TestStore & make it success run test * update indent code TestStore, add comment for send action assert testStore * change observable * update observable * rename conflicted name * undo * add flatmap * add xctest dynamic overlay podspec * add xctdo podspec * update exports.swift * update podspec * update typo podspec * fix dispose issue * restructure dependency module, fix test, update podspec and package.swift * update store old behaviour, fix store tests * remove unused code * fix flatmap, add StoreOf * update teststore generics order, remove all spi internals * Rewrite example using Reducer Protocol style (#63) * update store, rewrite basic and scoping example * rewrite environment example * rewrite pullback vc example * update counterview, rewrite iflet * rewrite never equal * update timer example * update test * update old scope and store tests * use OptionalPath * remove duplicated StoreConfig * add ACL for TestReducer class & property * fix default value for useNewScope in StoreConfig * [Reducer Protocol] - Add New Test Cases (#68) * fix passing useNewScope to Store from TestStore * add new test to TestStore * add new TestStoreTest cases * update to fix async task cancel * update StoreTest test case * add more StoreTests test cases * update failingWhenNothingChanges to true by default on new TestStore code * update & add new cases for TestStoreTest * remove import combine * separate oldScope & newScope test on Storetest and TestStoreTest * update testcases based on new default value for for Store and TestStore * [Reducer Protocol] - Support Bootstrap MockKit (#70) Support our Bootstrap MockKit when using ReducerProtocol Dependency Environment * update pullback vc * bump xcode versions * update ci.yml to use xcode 14.1 for example tests * update ci yml again for xcode 14.1 * refactor ci.yml * update xcode 14 1 name * sync with 0.44.1 minus PR 1510 and EffectTask * fix warning * Fix Reducer builder inference issue: pointfreeco/swift-composable-architecture#1591 Implement Test Pt1 * adding more test, still failing dependency test on both store and teststore * pointfreeco/swift-composable-architecture#1570 pointfreeco/swift-composable-architecture#1575 * add usenewscope * Sync Cancellation * Readd PR #1510 and add tests, fix tests examples * add optional reducer, update dependency values tests with binding * sync up to 0.46.0 * sync up to 0.47.2 * sync up to 0.48.0 * bump xctestdynamicoverlay * remove assert function on teststore * add failing when nothing change on scope teststore * update store send and mainqueue syntax --------- Co-authored-by: Andhika Setiadi <[email protected]> Co-authored-by: Jefferson Setiawan <[email protected]>
Changes:
StoreTests
&TestStoreTests
failingWhenNothingChanges
flag totrue
on new TestStore codeStoreTests
&TestStoreTests
into different files both foruseNewScope
valuetrue
andfalse