skip to Main Content

Xcode – Unit test, to test if a view controller has presented another view controller

I want to make a unit test to see if a view controller is presenting another view controller. func testMainTabController_WhenActionButtonIsTapped_NewSuppliersInvoiceControllerIsCreatedV2() { let sut = MainTabBarController() sut.loadViewIfNeeded() let myExpectation = expectation(description: "The sut should present a view controller") sut.actionButton.sendActions(for: .touchUpInside) if…

VIEW QUESTION

Testing Redis functionalities with Jest

I have the following file that connect to a redis database: index.js const redis = require('redis'); const logger = require('../logger'); const config = require('../env'); const client = redis.createClient({ host: config.redis.host, port: config.redis.port }); const connect = () => { client.on('connect',…

VIEW QUESTION
Back To Top
Search