Bash
I haven't tried these across environments, so I'm not positive they'll work -- but I think you can make this approach work. The basic approach is to try a hidden render and check if the render was successful. For instance:
echo -e '\xE0\xA5\xA5' | wc -m
wc -m counts the number of characters that are rendered. If you find that failure to render causes your input string to print, then this should be a way to perform an expected length check. If you find that failure to render causes a default symbol to be rendered, then I would suggest piping the output of echo into an equality check:
echo -e '\xE0\xA5\xA5' | grep -q 'some-default-failure-symbol'
A try-fail approach might seem hacky, but I don't think there's a standard for this so it's probably the most robust approach for now.
Node.js
Note: only works in browser, possibly a mock-browser. Not sure how or if a mock-browser would locate a local emoji package, but it's probably an easy thing to check.
There is a node.js module that uses very simple code to check if a system/browser supports an emoji. The code attempts to render the emoji and can tell whether the render was successful.
The npm package is called:
if-emoji
The source code is only a few lines long, and should be easy to understand if you're familiar with javascript (I won't copy and paste the full code here to leave Dafrok with the credit):
https://github.com/Dafrok/if-emoji