test/unit/helpers/foundation.js
// Every foundation test suite include this verification.
Every foundation test suite include this verification.
Every foundation test suite include this verification .
function verifyDefaultAdapter(FoundationClass, expectedMethods) {
  const {defaultAdapter} = FoundationClass;
  const methods = Object.keys(defaultAdapter).filter((k) => typeof defaultAdapter[k] === 'function');
  assert.equal(methods.length, Object.keys(defaultAdapter).length, 'Every adapter key must be a function');
  assert.deepEqual(methods.slice().sort(), expectedMethods.slice().sort());
  methods.forEach((m) => assert.doesNotThrow(defaultAdapter[m]));
}
function verifyDefaultAdapter ( FoundationClass , expectedMethods ) { const { defaultAdapter } = FoundationClass ; const methods = Object . keys ( defaultAdapter ) . filter ( ( k ) => typeof defaultAdapter [ k ] === 'function' ) ; assert . equal ( methods . length , Object . keys ( defaultAdapter ) . length , 'Every adapter key must be a function' ) ; assert . deepEqual ( methods . slice ( ) . sort ( ) , expectedMethods . slice ( ) . sort ( ) ) ; methods . forEach ( ( m ) => assert . doesNotThrow ( defaultAdapter [ m ] ) ) ; }
Every foundation test suite include this verification.
Every foundation test suite include this verification .
// Test for equality without requiring that the array be in a specific order // Test default methods