You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							20 lines
						
					
					
						
							450 B
						
					
					
				
			
		
		
	
	
							20 lines
						
					
					
						
							450 B
						
					
					
				/* eslint-env mocha */
 | 
						|
 | 
						|
var assert = require('assert')
 | 
						|
var appendField = require('../')
 | 
						|
var testData = require('testdata-w3c-json-form')
 | 
						|
 | 
						|
describe('Append Field', function () {
 | 
						|
  for (var test of testData) {
 | 
						|
    it('handles ' + test.name, function () {
 | 
						|
      var store = Object.create(null)
 | 
						|
 | 
						|
      for (var field of test.fields) {
 | 
						|
        appendField(store, field.key, field.value)
 | 
						|
      }
 | 
						|
 | 
						|
      assert.deepEqual(store, test.expected)
 | 
						|
    })
 | 
						|
  }
 | 
						|
})
 |