This is a follow-up to my previous question about setting the tt font in mathtt. As Henri Menke stated in a comment using typefaces should be preferred over font families. So I tried to convert the code given in his answer. The result is the following MWE:
\starttypescript[test]
\definetypeface [test] [rm] [serif] [pagella]
\definetypeface [test] [tt] [mono] [firacode]
\definefontfallback [ttupper] [firacode] [uppercasenormal] [offset=uppercasemonospace,force=yes]
\definefontfallback [ttlower] [firacode] [lowercasenormal] [offset=lowercasemonospace,force=yes]
\definetypeface [test] [mm] [math] [pagella] [default] [fallbacks={ttlower,ttupper}]
\stoptypescript
\setupbodyfont [test,12pt]
\starttext
Test \type{Text} with $\mathtt{TEST}$
\stoptext
Unfortunately, ConTeXt does not use the fallbacks I specified. How does the fallback mechanism work with typefaces?

\definefontfallbackneeds a font lookup as the second argument, either vianame:<name>, orfile:<file>. – Henri Menke Apr 20 '19 at 08:24