Refactor test case for single instance
Fix single-instance failed on window
Test case for single-instance with `open` method in Mac
Merge pull request #980 from kingFighter/single-instance

Refactor test case for single instance