Skip to content

Commit

Permalink
adapt test dump for creative tab output
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Aug 31, 2024
1 parent a3169f3 commit e4aab26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/__snapshots__/polytoneBlacklist.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

exports[`blacklist tests > does not create the jei blacklist config if nothing is hidden > creates a polytone tab modifier 1`] = `
"{
"targets": ["minecraft:example_tab"],
"removals": [
{
"type": "items_match",
"items": [
"forge:milk",
"minecraft:ice",
"minecraft:lava",
"minecraft:stone",
"minecraft:water"
]
Expand Down
10 changes: 8 additions & 2 deletions test/polytoneBlacklist.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { describe, expect, it } from 'vitest'
import { beforeEach, describe, expect, it } from 'vitest'
import createTestAcceptor from './mock/TestAcceptor.js'
import { createDumpResolver } from './mock/TestResolver.js'
import setupLoader from './shared/loaderSetup.js'

const { loader } = setupLoader({ load: false, hideFrom: ['polytone'] })

beforeEach(async () => {
const resolver = createDumpResolver()
await loader.loadRegistryDump(resolver)
})

describe('blacklist tests', () => {
it('does not generate a jei blacklist config file', async () => {
const acceptor = createTestAcceptor()
Expand All @@ -21,7 +27,7 @@ describe('blacklist tests', () => {
loader.blacklist.hide('minecraft:stone')
loader.blacklist.hide({ fluid: 'water' })
loader.blacklist.hide({ block: 'water' })
loader.blacklist.hide([{ item: 'ice' }, { fluid: 'forge:milk' }])
loader.blacklist.hide([{ item: 'ice' }, { fluid: 'minecraft:lava' }])

await loader.emit(acceptor)

Expand Down
1 change: 1 addition & 0 deletions test/resources/dump/creative_mode_tab/minecraft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["minecraft:example_tab"]

0 comments on commit e4aab26

Please sign in to comment.