mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
* BREAKING: Drop old Node support, require v10+ Update CI configs * Remove references and test fencing for old Node versions * Use object spread properties * Use octal literal notation * Use optional catch bindings
30 lines
637 B
JavaScript
30 lines
637 B
JavaScript
'use strict'
|
|
|
|
const fse = require('../..')
|
|
const assert = require('assert')
|
|
|
|
/* eslint-env mocha */
|
|
|
|
describe('realpath.native', () => {
|
|
it('works with callbacks', () => {
|
|
fse.realpath.native(__dirname, (err, path) => {
|
|
assert.ifError(err)
|
|
assert.strictEqual(path, __dirname)
|
|
})
|
|
})
|
|
|
|
it('works with promises', (done) => {
|
|
fse.realpath.native(__dirname)
|
|
.then(path => {
|
|
assert.strictEqual(path, __dirname)
|
|
done()
|
|
})
|
|
.catch(done)
|
|
})
|
|
|
|
it('works with sync version', () => {
|
|
const path = fse.realpathSync.native(__dirname)
|
|
assert.strictEqual(path, __dirname)
|
|
})
|
|
})
|