Skip to content

Commit

Permalink
Remove o and plugins (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif authored Mar 29, 2023
1 parent 99bd794 commit 8abf60e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 126 deletions.
43 changes: 0 additions & 43 deletions Sources/Scribe/Plugins/FilePlugin.swift

This file was deleted.

54 changes: 0 additions & 54 deletions Sources/Scribe/Plugins/URLPlugin.swift

This file was deleted.

File renamed without changes.
29 changes: 0 additions & 29 deletions Tests/ScribeTests/ScribeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,6 @@ import XCTest
@testable import Scribe

final class ScribeTests: XCTestCase {
func testExample() async throws {
let filename = "scribe.test"

let scribe = Scribe(
label: "Scribe.Tests",
plugins: [
FilePlugin(filename: filename) { payload in
"\(payload.level.rawValue.uppercased()): \(payload.message)"
}
]
)

let pluginTask = scribe.info("Test")

try await pluginTask.value

let fileContents: [String] = (try? o.file.in(filename: filename)) ?? []

XCTAssertEqual(fileContents.first, "INFO: Test")

// Clean up and delete test file

XCTAssertNoThrow(try o.file.string(filename: filename))

try o.file.delete(filename: filename)

XCTAssertThrowsError(try o.file.string(filename: filename))
}

func testPeristablePlugin() async throws {
class CountPlugin: ScribePlugin {
static let shared = CountPlugin()
Expand Down

0 comments on commit 8abf60e

Please sign in to comment.