How other programmers do it
I hesitate to tell about canonical packages, but there's a handful of pretty recognizable packages that skip certain operating systems for particular tests:
A couple of examples from the repositories above:
Example 1. Skips core functionality tests on Solaris platform.
Example 2. Skips installation tests for Linux (other tests in this project seemingly cover all operating systems).
What the documentation says
This is an official article of the testthat package. It clearly states the circumstances under which you might better skip the test; however, those statements tend to be more recommendatory rather than imperative:
You’re testing a web service that occasionally fails, and you don’t want to run the tests on CRAN. Or maybe the API requires authentication, and you can only run the tests when you’ve securely distributed some secrets.
You’re relying on features that not all operating systems possess, and want to make sure your code doesn’t run on a platform where it doesn’t work. This platform tends to be Windows, since amongst other things, it lacks full utf8 support.
You’re writing your tests for multiple versions of R or multiple versions of a dependency and you want to skip when a feature isn’t available. You generally don’t need to skip tests if a suggested package is not installed. This is only needed in exceptional circumstances, e.g. when a package is not available on some operating system.
I've highlighted everything that had been written regarding operating systems. From your question, I can conclude that your situation falls under the statement of "You’re relying on features that not all operating systems possess", since you've most likely encountered a bug in the M1 Mac operating system since macOS build has a slightly different way of calculating extended-precision floating-point numbers[1]:
The ‘native’ build is a little faster (and for some tasks, considerably so) but may give different numerical results from the far more common ‘x86_64’ platforms (on macOS and other OSes) as ARM hardware lacks extended-precision floating-point operations.
What the ideology adheres to
It's worth our time to recall why unit tests were invented in the first place.
In spite of all the talks about Wikipedia's unreliability, I believe this source is being considered "canonical" by the vast majority of my colleagues, which states:
Unit tests are typically automated tests written and run by software developers to ensure that a section of an application (known as the "unit") meets its design and behaves as intended.
In order to answer your question from the ideological perspective, we have to answer only one question: does your code currently work as intended?
If you consider your functionality to be comprehensive enough for the end user, even though it partially doesn't work properly on a particular OS, feel free to skip the test.
If not, it implies that your code contains bug that is to be fixed before going into the production. In this case, once you fix it, the tests should succeed with your problematic OS.
My code fails numerically on M1mac, but not on other platforms, while using stats::integrate on functions returning very small values.
My own (probably biased) opinion
Based on your words, it's hard to understand which one is the case, but I believe that if your package is viable for the 99.99% of the audience, go ahead and skip this annoying test for the 0.01 remaining percentile of the possible environments. Maybe you should note somewhere in the README.MD that your package has this issue.
This way other developers will be aware of it, and those are using M1Mac OS will most likely find a workaround or fix it themselves - in case you're creating an open-source project.
Notes:
[1]. Thanks to Roland's comment, I've updated my answer.