mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-03 20:27:50 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import {
 | 
						|
  lastSeenSuggestionInterval,
 | 
						|
  lowQualitySuggestionConfidenceThreshold
 | 
						|
} from 'wherehows-web/constants/metadata-acquisition';
 | 
						|
import { formatAsCapitalizedStringWithSpaces } from 'wherehows-web/utils/helpers/string';
 | 
						|
import { module, test } from 'qunit';
 | 
						|
 | 
						|
module('Unit | Utility | datasets/metadata acquisition', function() {
 | 
						|
  test('lastSeenSuggestionInterval is a number', function(assert) {
 | 
						|
    assert.ok(typeof lastSeenSuggestionInterval === 'number');
 | 
						|
  });
 | 
						|
});
 | 
						|
 | 
						|
module('Unit | Utility | datasets/metadata acquisition', function() {
 | 
						|
  test('lowQualitySuggestionConfidenceThreshold is a number', function(assert) {
 | 
						|
    assert.ok(typeof lowQualitySuggestionConfidenceThreshold === 'number');
 | 
						|
  });
 | 
						|
 | 
						|
  test('formatAsCapitalizedStringWithSpaces generates the correct display string', function(assert) {
 | 
						|
    [
 | 
						|
      ['CONFIDENTIAL', 'Confidential'],
 | 
						|
      ['LIMITED_DISTRIBUTION', 'Limited distribution'],
 | 
						|
      ['HIGHLY_CONFIDENTIAL', 'Highly confidential']
 | 
						|
    ].forEach(([source, target]) => {
 | 
						|
      assert.equal(formatAsCapitalizedStringWithSpaces(source), target, `correctly converts ${source}`);
 | 
						|
    });
 | 
						|
  });
 | 
						|
});
 |