test-constants.js 356 B

1234567891011121314
  1. var sys = require("util")
  2. , assert = require("assert")
  3. , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
  4. , xhr = new XMLHttpRequest();
  5. // Test constant values
  6. assert.equal(0, xhr.UNSENT);
  7. assert.equal(1, xhr.OPENED);
  8. assert.equal(2, xhr.HEADERS_RECEIVED);
  9. assert.equal(3, xhr.LOADING);
  10. assert.equal(4, xhr.DONE);
  11. sys.puts("done");