Lint: Make CheckHarnessFeatures output stable.

The iteration order for a set is not guaranteed to be stable, but this test expected it to be.
This commit is contained in:
Ms2ger 2019-08-09 15:44:23 +02:00
parent c4e5d69044
commit 8946956f19
2 changed files with 4 additions and 3 deletions

View File

@ -55,9 +55,10 @@ class CheckHarnessFeatures(Check):
return return
if len(result['missing']) > 0: if len(result['missing']) > 0:
missing = ', '.join(sorted(result['missing']))
if len(result['features']) == 0: if len(result['features']) == 0:
return 'Missing: `features: [%s]`' % ', '.join(list(result['missing'])) return 'Missing: `features: [%s]`' % missing
else: else:
return 'Missing from `features`: %s' % ', '.join(list(result['missing'])) return 'Missing from `features`: %s' % missing
else: else:
return return

View File

@ -1,4 +1,4 @@
HARNESS_FEATURES - Missing: `features: [Symbol.toPrimitive, BigInt]` HARNESS_FEATURES - Missing: `features: [BigInt, Symbol.toPrimitive]`
^ expected errors | v input ^ expected errors | v input
// Copyright (C) 2017 Rick Waldron. All rights reserved. // Copyright (C) 2017 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.