mixpanel-swift/MixpanelDemo/MixpanelDemoTests/TestConstants.swift
2025-05-29 17:45:08 -07:00

35 lines
726 B
Swift

//
// TestConstants.swift
// MixpanelDemo
//
// Created by Yarden Eitan on 6/28/16.
// Copyright © 2016 Mixpanel. All rights reserved.
//
import XCTest
@testable import Mixpanel
let kFakeServerUrl = "https://34a272abf23d.com"
extension XCTestCase {
func XCTExpectAssert(
_ expectedMessage: String, file: StaticString = #file, line: UInt = #line, block: () -> Void
) {
let exp = expectation(description: expectedMessage)
Assertions.assertClosure = {
(condition, message, file, line) in
if !condition {
exp.fulfill()
}
}
// Call code.
block()
waitForExpectations(timeout: 60, handler: nil)
Assertions.assertClosure = Assertions.swiftAssertClosure
}
}