package init
This commit is contained in:
parent
384903ec7b
commit
64ab5f3d46
28
nodejs-proxyquire-helloworld.patch
Normal file
28
nodejs-proxyquire-helloworld.patch
Normal file
@ -0,0 +1,28 @@
|
||||
commit c0121c386f613d4db744159d875ebfccc345c778
|
||||
Author: Tom Hughes <tom@compton.nu>
|
||||
Date: Fri Jan 27 00:27:02 2017 +0000
|
||||
|
||||
Drop test that needs native-hello-world
|
||||
|
||||
diff --git a/test/proxyquire-global.js b/test/proxyquire-global.js
|
||||
index e09fce6..29999df 100644
|
||||
--- a/test/proxyquire-global.js
|
||||
+++ b/test/proxyquire-global.js
|
||||
@@ -39,17 +39,6 @@ describe('global flags set', function () {
|
||||
assert.equal(realFoo(), false)
|
||||
assert.equal(proxiedFoo(), true)
|
||||
})
|
||||
-
|
||||
- it('should not throw when a native module is required a second time', function () {
|
||||
- var stubs = {
|
||||
- 'foo': {
|
||||
- '@global': true
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- proxyquire('native-hello-world', stubs)
|
||||
- proxyquire('native-hello-world', stubs)
|
||||
- })
|
||||
})
|
||||
|
||||
describe('global flags not set', function () {
|
||||
40
nodejs-proxyquire.spec
Normal file
40
nodejs-proxyquire.spec
Normal file
@ -0,0 +1,40 @@
|
||||
Name: nodejs-proxyquire
|
||||
Version: 2.0.1
|
||||
Release: 1
|
||||
Summary: Proxies Node.js require to allow overriding dependencies
|
||||
License: MIT
|
||||
URL: https://github.com/thlorenz/proxyquire
|
||||
Source0: http://registry.npmjs.org/proxyquire/-/proxyquire-%{version}.tgz
|
||||
Patch0: nodejs-proxyquire-helloworld.patch
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
BuildRequires: npm(fill-keys) npm(module-not-found-error) npm(mocha) npm(resolve) npm(should)
|
||||
%description
|
||||
Proxies Node,js's require in order to make overriding dependencies
|
||||
during testing easy while staying totally unobstrusive.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n package
|
||||
%nodejs_fixdep resolve "^1.1.7"
|
||||
rm -rf node_modules
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/proxyquire
|
||||
cp -pr package.json index.js lib %{buildroot}%{nodejs_sitelib}/proxyquire
|
||||
%nodejs_symlink_deps
|
||||
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
%{nodejs_sitelib}/mocha/bin/mocha
|
||||
|
||||
%files
|
||||
%doc README.md examples
|
||||
%license LICENSE
|
||||
%{nodejs_sitelib}/proxyquire
|
||||
|
||||
%changelog
|
||||
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 2.0.1-1
|
||||
- package init
|
||||
4
nodejs-proxyquire.yaml
Normal file
4
nodejs-proxyquire.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version-control: github
|
||||
src_repo: thlorenz/proxyquire
|
||||
tag_prefix: ^v
|
||||
seperator: .
|
||||
BIN
proxyquire-2.0.1.tgz
Normal file
BIN
proxyquire-2.0.1.tgz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user