tracker
All repositories: gitoria
1.8 KB
// tracker#62: native lookups preserve map winners and creation conflict suffixes.import { personsTable, showsTable } from '../lib/shows.hl'import { personBySlug, personIdByTmdb, castPersonId, guestPersonId } from '../lib/people.hl'static check = (Boolean ok, String message) => { if (!ok) { hlError(message) } }static run = () => {for (p of [{ id = 'index-first' oldId = 'index-first' name = 'Same Name' urlSegment = 'Same-Name' tmdbId = 87650001 }{ id = 'index-last' oldId = 'index-last' name = 'Same Name' urlSegment = 'Same-Name' tmdbId = 87650001 }{ id = 'index-suffix' oldId = 'index-suffix' name = 'Same Name' urlSegment = 'Same-Name-2' tmdbId = 87650002 }]) { check(personsTable.put(p) != null, 'seed') }check(personBySlug('Same-Name').id == 'index-last', 'last slug winner')check(personIdByTmdb(87650001) == 'index-last', 'last TMDB winner')check(personIdByTmdb('87650001') == 'index-last', 'TMDB string coercion')check(personBySlug('missing') == null && personBySlug('') == null && personBySlug(null) == null, 'absent slug')check(personIdByTmdb(87659999) == null, 'absent TMDB')c = { tmdbId = 87650003 name = 'Same Name' character = 'Role' }id = castPersonId(&c, null)check(id != null && personBySlug('Same-Name-3').id == id, 'conflict suffix')check(castPersonId(&c, null) == id, 'repeat cast import')check(guestPersonId(87650003, null).created == false, 'known guest')s = { id = 'index-show' oldId = 'index-show' cast = [{ tmdbId = 87650004 actor = 'Same Name' character = 'Guest' }] }check(showsTable.put(s) != null, 'guest show')g = guestPersonId(87650004, 'index-show')check(g.created && personBySlug('Same-Name-4').id == g.id, 'new guest')check(guestPersonId(87650004, 'index-show').created == false, 'guest revisit')check(personIdByTmdb(87650004) == g.id, 'new guest TMDB lookup')personsTable.persist()console.log('person-index: passed')return true}run()
Branches
Latest commits
- d049b8b8Log: HM50 live, #52 donemre
- 6d05fa37Log: HM50 Part A mergedmre
- 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
- e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
- 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre
- 1c4715a4RT50 mission: day50 repro retestmre
- 57d1c0dcLog: day50 retest requestmre
- 60b1f419Log: Anton #336 result, wake checkmre
- 919a18aalog: scratchmre
- 6b504440status tidymre
- 9332bd10log: DP70 livemre
- be11daa0DP70 brief fixmre
- 886a7028DP70 brief, HM67 mergedmre
- b41cdd6dMerge hm67-searchids: packed search IDsmre
- 385904eaReport HM67 matched heap measurements and gate proofmre
- e5c9b659Pack retained search IDs into UTF-8 bytesmre