Skip to content

Commit

Permalink
reorganize code, looks better
Browse files Browse the repository at this point in the history
  • Loading branch information
LucunJi committed Mar 6, 2024
1 parent 501a1b0 commit 6c4ee3e
Show file tree
Hide file tree
Showing 11 changed files with 397 additions and 354 deletions.
3 changes: 2 additions & 1 deletion __tests__/dependency.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DependencySettings, PatternPart, Dependency, Property } from '../src/dependency'
import { DependencySettings, Dependency, Property } from '../src/dependency'
import { PatternPart } from '../src/pattern'
import { McVersion } from '../src/version'


Expand Down
10 changes: 1 addition & 9 deletions __tests__/network.test.ts → __tests__/network/maven.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import * as network from "../src/network"

describe('fetchLatestVersions', () => {
it('normal', async () => {
const versions = await network.fetchLatestMcVersions()
expect(versions).toBeInstanceOf(Map)
expect(versions.size).toBeGreaterThan(0)
})
})
import * as network from "../../src/network/maven"

describe('fetchMavenVersion', () => {
// the version lists used for test should be unlikely to be changed be changed in the future
Expand Down
9 changes: 9 additions & 0 deletions __tests__/network/minecraft.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as network from "../../src/network/minecraft"

describe('fetchLatestVersions', () => {
it('normal', async () => {
const versions = await network.fetchLatestMcPatches()
expect(versions).toBeInstanceOf(Map)
expect(versions.size).toBeGreaterThan(0)
})
})
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6c4ee3e

Please sign in to comment.